mesa: set up gl_vert_result and gl_frag_attrib values for gl_ClipDistance.
[mesa.git] / src / glsl / opt_copy_propagation.cpp
index 4ab23bf9b0cd592bc783df872a2a20e8d18e93a4..efa3afda35aefe40f19e45bc8fe208b499aee1bc 100644 (file)
@@ -191,7 +191,7 @@ ir_copy_propagation_visitor::visit_enter(ir_call *ir)
       sig_param_iter.next();
    }
 
-   /* Since we're unlinked, we don't (necssarily) know the side effects of
+   /* Since we're unlinked, we don't (necessarily) know the side effects of
     * this call.  So kill all copies.
     */
    acp->make_empty();
@@ -309,11 +309,8 @@ ir_copy_propagation_visitor::add_copy(ir_assignment *ir)
 {
    acp_entry *entry;
 
-   if (ir->condition) {
-      ir_constant *condition = ir->condition->as_constant();
-      if (!condition || !condition->value.b[0])
-        return;
-   }
+   if (ir->condition)
+      return;
 
    ir_variable *lhs_var = ir->whole_variable_written();
    ir_variable *rhs_var = ir->rhs->whole_variable_referenced();