From: Matt Turner Date: Sat, 23 Aug 2014 05:13:41 +0000 (-0700) Subject: i965/compaction: Increment offset in for loop. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b92a1e21747b58ec15faad6955ac3b9b6b8d2a44;p=mesa.git i965/compaction: Increment offset in for loop. Reviewed-by: Kenneth Graunke Reviewed-by: Jason Ekstrand Reviewed-by: Ian Romanick --- diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index dd32175b66d..696ed9838bc 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -1160,7 +1160,8 @@ brw_compact_instructions(struct brw_compile *p, int start_offset, /* Fix up control flow offsets. */ p->next_insn_offset = start_offset + offset; - for (offset = 0; offset < p->next_insn_offset - start_offset;) { + for (offset = 0; offset < p->next_insn_offset - start_offset; + offset = next_offset(brw, store, offset)) { brw_inst *insn = store + offset; int this_old_ip = old_ip[offset / 8]; int this_compacted_count = compacted_counts[this_old_ip]; @@ -1188,8 +1189,6 @@ brw_compact_instructions(struct brw_compile *p, int start_offset, } break; } - - offset = next_offset(brw, store, offset); } /* p->nr_insn is counting the number of uncompacted instructions still, so