mesa: set up gl_vert_result and gl_frag_attrib values for gl_ClipDistance.
[mesa.git] / src / glsl / opt_dead_code_local.cpp
index 2610b69815926a74051d8ad11b416573f28c1753..39962bd602ef8ba89a2ad34eba903d82cdbdc437 100644 (file)
@@ -129,15 +129,8 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments)
    var = ir->lhs->variable_referenced();
    assert(var);
 
-   bool always_assign = true;
-   if (ir->condition) {
-      ir_constant *condition = ir->condition->as_constant();
-      if (!condition || !condition->value.b[0])
-        always_assign = false;
-   }
-
    /* Now, check if we did a whole-variable assignment. */
-   if (always_assign && (ir->whole_variable_written() != NULL)) {
+   if (!ir->condition && (ir->whole_variable_written() != NULL)) {
       /* We did a whole-variable assignment.  So, any instruction in
        * the assignment list with the same LHS is dead.
        */