summaryrefslogtreecommitdiff
path: root/src/glsl/link_uniform_block_active_visitor.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-09-24 14:30:29 -0700
committerPaul Berry <stereotype441@gmail.com>2013-10-09 16:49:26 -0700
commit22d3ef2df1f4fd6c4a0aaf17996fdcd9b70547cb (patch)
tree609e6c8706f024d684eb32b8de1e828a57dcefb6 /src/glsl/link_uniform_block_active_visitor.cpp
parent6f19e552af7ab078cfefbcaa1560bb921ddcaf07 (diff)
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>
Diffstat (limited to 'src/glsl/link_uniform_block_active_visitor.cpp')
-rw-r--r--src/glsl/link_uniform_block_active_visitor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/glsl/link_uniform_block_active_visitor.cpp b/src/glsl/link_uniform_block_active_visitor.cpp
index 56a8384e996..f2f46a21130 100644
--- a/src/glsl/link_uniform_block_active_visitor.cpp
+++ b/src/glsl/link_uniform_block_active_visitor.cpp
@@ -27,12 +27,12 @@
link_uniform_block_active *
process_block(void *mem_ctx, struct hash_table *ht, ir_variable *var)
{
- const uint32_t h = _mesa_hash_string(var->interface_type->name);
+ const uint32_t h = _mesa_hash_string(var->get_interface_type()->name);
const hash_entry *const existing_block =
- _mesa_hash_table_search(ht, h, var->interface_type->name);
+ _mesa_hash_table_search(ht, h, var->get_interface_type()->name);
const glsl_type *const block_type = var->is_interface_instance()
- ? var->type : var->interface_type;
+ ? var->type : var->get_interface_type();
/* If a block with this block-name has not previously been seen, add it.
@@ -46,7 +46,7 @@ process_block(void *mem_ctx, struct hash_table *ht, ir_variable *var)
b->type = block_type;
b->has_instance_name = var->is_interface_instance();
- _mesa_hash_table_insert(ht, h, var->interface_type->name,
+ _mesa_hash_table_insert(ht, h, var->get_interface_type()->name,
(void *) b);
return b;
} else {
@@ -90,7 +90,7 @@ link_uniform_block_active_visitor::visit_enter(ir_dereference_array *ir)
if (b == NULL) {
linker_error(prog,
"uniform block `%s' has mismatching definitions",
- var->interface_type->name);
+ var->get_interface_type()->name);
this->success = false;
return visit_stop;
}
@@ -149,7 +149,7 @@ link_uniform_block_active_visitor::visit(ir_dereference_variable *ir)
if (b == NULL) {
linker_error(this->prog,
"uniform block `%s' has mismatching definitions",
- var->interface_type->name);
+ var->get_interface_type()->name);
this->success = false;
return visit_stop;
}