glsl: Make accessor functions for ir_variable::interface_type.

In a future patch, this will allow us to enforce invariants when the
interface type is updated.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Paul Berry
2013-09-24 14:30:29 -07:00
parent 6f19e552af
commit 22d3ef2df1
9 changed files with 51 additions and 33 deletions
+3 -3
View File
@@ -152,7 +152,7 @@ flatten_named_interface_blocks_declarations::run(exec_list *instructions)
}
new_var->location = iface_t->fields.structure[i].location;
new_var->interface_type = iface_t;
new_var->init_interface_type(iface_t);
hash_table_insert(interface_namespace, new_var,
iface_field_name);
insert_pos->insert_after(new_var);
@@ -208,9 +208,9 @@ flatten_named_interface_blocks_declarations::handle_rvalue(ir_rvalue **rvalue)
if (var->mode == ir_var_uniform)
return;
if (var->interface_type != NULL) {
if (var->get_interface_type() != NULL) {
char *iface_field_name =
ralloc_asprintf(mem_ctx, "%s.%s", var->interface_type->name,
ralloc_asprintf(mem_ctx, "%s.%s", var->get_interface_type()->name,
ir->field);
/* Find the variable in the set of flattened interface blocks */
ir_variable *found_var =