Mesa (master): glsl2: Early return with visit_continue in loop_analysis:: visit(ir_dereference_variable *)
Ian Romanick
idr at kemper.freedesktop.org
Tue Sep 7 20:42:09 UTC 2010
Module: Mesa
Branch: master
Commit: 956f049fd24eb5239361e68a1f27e1bebb3315a0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=956f049fd24eb5239361e68a1f27e1bebb3315a0
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Tue Sep 7 13:33:48 2010 -0700
glsl2: Early return with visit_continue in loop_analysis::visit(ir_dereference_variable *)
Returning early with visit_continue_with_parent prevented the
then-statements and else-statements of if-statements such as the
following from being processed:
if (some_var) { ... } else { ... }
Fixes piglit test case glsl-fs-loop-nested-if and bugzilla #30030.
---
src/glsl/loop_analysis.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
index 32e8b8c..91e34da 100644
--- a/src/glsl/loop_analysis.cpp
+++ b/src/glsl/loop_analysis.cpp
@@ -154,7 +154,7 @@ loop_analysis::visit(ir_dereference_variable *ir)
/* If we're not somewhere inside a loop, there's nothing to do.
*/
if (this->state.is_empty())
- return visit_continue_with_parent;
+ return visit_continue;
loop_variable_state *const ls =
(loop_variable_state *) this->state.get_head();
More information about the mesa-commit
mailing list