draw: corrections to allow for different cliptest cases
[mesa.git] / src / glsl / ir_clone.cpp
index a72609601ae1c17c2245574c7ba0f875203158ff..18543a35aa19c93a4bb52e8b1537ec9b8ec437f3 100644 (file)
@@ -134,12 +134,16 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const
       new_loop->body_instructions.push_tail(ir->clone(mem_ctx, ht));
    }
 
+   new_loop->cmp = this->cmp;
    return new_loop;
 }
 
 ir_call *
 ir_call::clone(void *mem_ctx, struct hash_table *ht) const
 {
+   if (this->type == glsl_type::error_type)
+      return ir_call::get_error_instruction(mem_ctx);
+
    exec_list new_parameters;
 
    foreach_iter(exec_list_iterator, iter, this->actual_parameters) {
@@ -271,7 +275,7 @@ ir_function_signature::clone(void *mem_ctx, struct hash_table *ht) const
       new(mem_ctx) ir_function_signature(this->return_type);
 
    copy->is_defined = this->is_defined;
-   copy->is_built_in = this->is_built_in;
+   copy->is_builtin = this->is_builtin;
 
    /* Clone the parameter list.
     */
@@ -335,7 +339,7 @@ ir_constant::clone(void *mem_ctx, struct hash_table *ht) const
    }
 
    default:
-      assert(!"Should not get here."); break;
+      assert(!"Should not get here.");
       return NULL;
    }
 }