[Mesa-dev] [PATCH 06/14] i965/compaction: Increment offset in for loop.

Matt Turner mattst88 at gmail.com
Thu Aug 28 20:10:36 PDT 2014


---
 src/mesa/drivers/dri/i965/brw_eu_compact.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
index dd32175..696ed98 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
-- 
1.8.5.5



More information about the mesa-dev mailing list