aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/opt_constant_variable.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-07 07:14:23 +0000
committermarha <marha@users.sourceforge.net>2011-02-07 07:14:23 +0000
commit53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae (patch)
tree8269551248a104f428f6245fba51d659775489e2 /mesalib/src/glsl/opt_constant_variable.cpp
parent39522c7dc587b335b0e0e00fc68f98e6a7a5c7bd (diff)
downloadvcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.tar.gz
vcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.tar.bz2
vcxsrv-53bf2508fe3d5bd7889ccf4817fcd2bcc531d6ae.zip
mesa git update 7 Feb 2011
Diffstat (limited to 'mesalib/src/glsl/opt_constant_variable.cpp')
-rw-r--r--mesalib/src/glsl/opt_constant_variable.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/mesalib/src/glsl/opt_constant_variable.cpp b/mesalib/src/glsl/opt_constant_variable.cpp
index 1f51da6e4..9dca0ff8e 100644
--- a/mesalib/src/glsl/opt_constant_variable.cpp
+++ b/mesalib/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)