mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 21:00:22 +01:00
glsl: Consider the "else" branch when looking for loop breaks.
Found this bug by code inspection. Based off the comments just before
this code, the intent is to find whether the break exists in the "then"
branch or the "else" branch. However, the code actually looked at the
last instruction in the "then" branch twice.
(cherry picked from commit 13c45c590b)
This commit is contained in:
parent
760288bec1
commit
4f2f3440d0
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ loop_unroll_visitor::visit_leave(ir_loop *ir)
|
|||
if (is_break(last)) {
|
||||
continue_from_then_branch = false;
|
||||
} else {
|
||||
last = (ir_instruction *) last_if->then_instructions.get_tail();
|
||||
last = (ir_instruction *) last_if->else_instructions.get_tail();
|
||||
|
||||
if (is_break(last))
|
||||
continue_from_then_branch = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue