glsl: Keep track of location for interface block fields.
[mesa.git] / src / glsl / glsl_types.cpp
index 3c396dd89705e348b6467bec0d52e2a93abb1311..4782d159df22906236e56046499fb856e10d5dcf 100644 (file)
@@ -100,6 +100,7 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
       this->fields.structure[i].type = fields[i].type;
       this->fields.structure[i].name = ralloc_strdup(this->fields.structure,
                                                     fields[i].name);
+      this->fields.structure[i].location = fields[i].location;
       this->fields.structure[i].row_major = fields[i].row_major;
    }
 }
@@ -124,6 +125,7 @@ glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
       this->fields.structure[i].type = fields[i].type;
       this->fields.structure[i].name = ralloc_strdup(this->fields.structure,
                                                     fields[i].name);
+      this->fields.structure[i].location = fields[i].location;
       this->fields.structure[i].row_major = fields[i].row_major;
    }
 }