i965: Fix assertion failure on a loop consisting of while (true) { break }.
authorEric Anholt <eric@anholt.net>
Tue, 16 Aug 2011 01:40:14 +0000 (18:40 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 16 Aug 2011 20:04:43 +0000 (13:04 -0700)
On enabling the precompile step in the VS, we tripped over this
assertion failure in glsl-link-bug-30552.

src/mesa/drivers/dri/i965/brw_eu_emit.c

index b089064..f5cc09d 100644 (file)
@@ -2311,7 +2311,7 @@ brw_find_loop_end(struct brw_compile *p, int start)
       if (insn->header.opcode == BRW_OPCODE_WHILE) {
         int jip = intel->gen == 6 ? insn->bits1.branch_gen6.jump_count
                                   : insn->bits3.break_cont.jip;
-        if (ip + jip / br < start)
+        if (ip + jip / br <= start)
            return ip;
       }
    }