summaryrefslogtreecommitdiff
path: root/src/glsl/opt_constant_variable.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-01-30 07:59:14 +1000
committerEric Anholt <eric@anholt.net>2011-02-04 12:18:38 -0600
commit29a2e9133e415de8b010df5b80db758aaf1007a6 (patch)
tree146ef5788bce45b707b983caac8d8f74d41f9814 /src/glsl/opt_constant_variable.cpp
parentb6d49ab843ff7ee989e99bb28a36eb53f704c879 (diff)
glsl: Remove extra checks for constant true assignment conditions.
These are already stripped by opt_constant_folding.cpp.
Diffstat (limited to 'src/glsl/opt_constant_variable.cpp')
-rw-r--r--src/glsl/opt_constant_variable.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp
index 1f51da6e4f..9dca0ff8e7 100644
--- a/src/glsl/opt_constant_variable.cpp
+++ b/src/glsl/opt_constant_variable.cpp
@@ -107,11 +107,8 @@ ir_constant_variable_visitor::visit_enter(ir_assignment *ir)
/* OK, now find if we actually have all the right conditions for
* this to be a constant value assigned to the var.
*/
- if (ir->condition) {
- constval = ir->condition->constant_expression_value();
- if (!constval || !constval->value.b[0])
- return visit_continue;
- }
+ if (ir->condition)
+ return visit_continue;
ir_variable *var = ir->whole_variable_written();
if (!var)