summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-05-17 13:03:59 -0700
committerMatt Turner <[email protected]>2014-05-24 23:03:23 -0700
commit8942f44c8d2ff5454d523b85ba126c6fae0d81ff (patch)
tree502da8a5da6ef3db782b74b1da7622b5e0d65039 /src/mesa/drivers/dri/i965
parent392cbc2f930b2505520e85b97b407cb6d4e17548 (diff)
i965: Use next_offset() in instruction compaction code.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_compact.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
index 40d1fc23ec8..f6f055fd5fa 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
@@ -765,11 +765,7 @@ brw_compact_instructions(struct brw_compile *p, int start_offset,
break;
}
- if (insn->header.cmpt_control) {
- offset += 8;
- } else {
- offset += 16;
- }
+ offset = next_offset(store, offset);
}
/* p->nr_insn is counting the number of uncompacted instructions still, so
@@ -792,22 +788,12 @@ brw_compact_instructions(struct brw_compile *p, int start_offset,
while (start_offset + old_ip[offset / 8] * 8 != annotation[i].offset) {
assert(start_offset + old_ip[offset / 8] * 8 <
annotation[i].offset);
- struct brw_instruction *insn = store + offset;
- if (insn->header.cmpt_control) {
- offset += 8;
- } else {
- offset += 16;
- }
+ offset = next_offset(store, offset);
}
annotation[i].offset = start_offset + offset;
- struct brw_instruction *insn = store + offset;
- if (insn->header.cmpt_control) {
- offset += 8;
- } else {
- offset += 16;
- }
+ offset = next_offset(store, offset);
}
annotation[num_annotations].offset = p->next_insn_offset;