X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fopt_constant_variable.cpp;h=3fa7c3badc804c4ae5aa6d55d67876bffb18fc1d;hb=7199b0b6811b3340cb5c531c8625220e964fa16c;hp=1fb73e765e1c842692d2b500d61bb01100a737dc;hpb=32aaf89823de11e98cb59d5ec78c66cd3e74bcd4;p=mesa.git diff --git a/src/glsl/opt_constant_variable.cpp b/src/glsl/opt_constant_variable.cpp index 1fb73e765e1..3fa7c3badc8 100644 --- a/src/glsl/opt_constant_variable.cpp +++ b/src/glsl/opt_constant_variable.cpp @@ -22,7 +22,7 @@ */ /** - * \file ir_constant_variable.cpp + * \file opt_constant_variable.cpp * * Marks variables assigned a single constant value over the course * of the program as constant. @@ -104,11 +104,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)