summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-08-21 23:02:49 -0700
committerMatt Turner <[email protected]>2014-08-22 09:30:03 -0700
commitd77f5603a5de26e66561ec003118bbfb1a07666b (patch)
tree2aacf05f02e8402b062d2abf4e2abb31bf06ced9 /src/mesa
parent2a553e4dc9f7728464f84f23f0fb6c76648990f0 (diff)
i965: Fix JIP/UIP calculations.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82846 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82929
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_compact.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
index 3680c55e292..4f509dde135 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
@@ -1029,19 +1029,17 @@ update_uip_jip(struct brw_context *brw, brw_inst *insn,
{
int scale = brw->gen >= 8 ? sizeof(brw_compact_inst) : 1;
- int32_t jip = brw_inst_jip(brw, insn);
- jip -= scale *
- compacted_between(this_old_ip, this_old_ip + jip, compacted_counts);
- brw_inst_set_jip(brw, insn, jip);
+ int32_t jip = brw_inst_jip(brw, insn) / scale;
+ jip -= compacted_between(this_old_ip, this_old_ip + jip, compacted_counts);
+ brw_inst_set_jip(brw, insn, jip * scale);
if (brw_inst_opcode(brw, insn) == BRW_OPCODE_ENDIF ||
brw_inst_opcode(brw, insn) == BRW_OPCODE_WHILE)
return;
- int32_t uip = brw_inst_uip(brw, insn);
- uip -= scale *
- compacted_between(this_old_ip, this_old_ip + uip, compacted_counts);
- brw_inst_set_uip(brw, insn, uip);
+ int32_t uip = brw_inst_uip(brw, insn) / scale;
+ uip -= compacted_between(this_old_ip, this_old_ip + uip, compacted_counts);
+ brw_inst_set_uip(brw, insn, uip * scale);
}
void