glsl: Populate built-in types correctly for GLSL 3.00 ES.
[mesa.git] / src / glsl / ir_clone.cpp
index 26b0d8f5f3f40798d87f52b37fb72617c3fb9e39..4314efa76d402e12ed3ed293521b126da2d894fc 100644 (file)
@@ -53,10 +53,13 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
    var->invariant = this->invariant;
    var->interpolation = this->interpolation;
    var->location = this->location;
+   var->index = this->index;
+   var->uniform_block = this->uniform_block;
    var->warn_extension = this->warn_extension;
    var->origin_upper_left = this->origin_upper_left;
    var->pixel_center_integer = this->pixel_center_integer;
    var->explicit_location = this->explicit_location;
+   var->explicit_index = this->explicit_index;
    var->has_initializer = this->has_initializer;
    var->depth_layout = this->depth_layout;
 
@@ -71,9 +74,6 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const
             sizeof(this->state_slots[0]) * var->num_state_slots);
    }
 
-   if (this->explicit_location)
-      var->location = this->location;
-
    if (this->constant_value)
       var->constant_value = this->constant_value->clone(mem_ctx, ht);
 
@@ -325,6 +325,7 @@ ir_function_signature::clone_prototype(void *mem_ctx, struct hash_table *ht) con
 
    copy->is_defined = false;
    copy->is_builtin = this->is_builtin;
+   copy->origin = this;
 
    /* Clone the parameter list, but NOT the body.
     */