i965/compaction: Increment offset in for loop.
authorMatt Turner <mattst88@gmail.com>
Sat, 23 Aug 2014 05:13:41 +0000 (22:13 -0700)
committerMatt Turner <mattst88@gmail.com>
Thu, 25 Sep 2014 18:02:36 +0000 (11:02 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_eu_compact.c

index dd32175..696ed98 100644 (file)
@@ -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