diff options
author | Matt Turner <[email protected]> | 2014-06-17 12:14:44 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-08-18 18:18:50 -0700 |
commit | 2faa1a414c985c3dd86bcfc9c0dfa33784ad67ab (patch) | |
tree | 42c37006a8a0e20e613a8de2b0f9b59a88614db4 | |
parent | 23ab55cb6c7936fd2c3d017bb9b5f5f7e5b19a06 (diff) |
i965: Update JIP/UIP compaction code to operate on bytes.
JIP/UIP were previously in units of compacted instructions. On Gen8
they're in units of bytes.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_compact.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 25a96e7641c..ecd97978bce 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -653,16 +653,20 @@ static void update_uip_jip(struct brw_context *brw, brw_inst *insn, int this_old_ip, int *compacted_counts) { - int jip = brw_inst_jip(brw, insn); - jip -= compacted_between(this_old_ip, this_old_ip + jip, compacted_counts); + 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); if (brw_inst_opcode(brw, insn) == BRW_OPCODE_ENDIF || brw_inst_opcode(brw, insn) == BRW_OPCODE_WHILE) return; - int uip = brw_inst_uip(brw, insn); - uip -= compacted_between(this_old_ip, this_old_ip + uip, compacted_counts); + 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); } |