mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
i965: Fix nested loops in the VS.
We were patching up all the break and continues between the start of
our loop and the end of our loop, even if they were breaks/continues
for an inner loop. Avoiding patching already patched breaks/continues
fixes piglit glsl-vs-loop-nested.
(cherry picked from commit f6f547d87e)
This commit is contained in:
parent
009392f50d
commit
d24f59d008
1 changed files with 4 additions and 2 deletions
|
|
@ -1717,11 +1717,13 @@ void brw_vs_emit(struct brw_vs_compile *c )
|
|||
/* patch all the BREAK/CONT instructions from last BEGINLOOP */
|
||||
while (inst0 > loop_inst[loop_depth]) {
|
||||
inst0--;
|
||||
if (inst0->header.opcode == BRW_OPCODE_BREAK) {
|
||||
if (inst0->header.opcode == BRW_OPCODE_BREAK &&
|
||||
inst0->bits3.if_else.jump_count == 0) {
|
||||
inst0->bits3.if_else.jump_count = br * (inst1 - inst0 + 1);
|
||||
inst0->bits3.if_else.pop_count = 0;
|
||||
}
|
||||
else if (inst0->header.opcode == BRW_OPCODE_CONTINUE) {
|
||||
else if (inst0->header.opcode == BRW_OPCODE_CONTINUE &&
|
||||
inst0->bits3.if_else.jump_count == 0) {
|
||||
inst0->bits3.if_else.jump_count = br * (inst1 - inst0);
|
||||
inst0->bits3.if_else.pop_count = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue