Mesa (glsl2): ir_to_mesa: Traverse the "else" instrs after "else", instead of "then" again.

Eric Anholt anholt at kemper.freedesktop.org
Mon Jun 28 20:30:13 UTC 2010


Module: Mesa
Branch: glsl2
Commit: 0a52e8b691cecfeec27717c3289763226d5f1bda
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a52e8b691cecfeec27717c3289763226d5f1bda

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jun 28 11:44:30 2010 -0700

ir_to_mesa: Traverse the "else" instrs after "else", instead of "then" again.

---

 src/mesa/shader/ir_to_mesa.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index b8113da..a825bf9 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -1159,7 +1159,7 @@ ir_to_mesa_visitor::visit(ir_if *ir)
       else_inst = ir_to_mesa_emit_op1(ir->condition, OPCODE_ELSE,
 				      ir_to_mesa_undef_dst,
 				      ir_to_mesa_undef);
-      visit_exec_list(&ir->then_instructions, this);
+      visit_exec_list(&ir->else_instructions, this);
    }
 
    if_inst = ir_to_mesa_emit_op1(ir->condition, OPCODE_ENDIF,




More information about the mesa-commit mailing list