aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-01-21 21:51:15 -0500
committerIan Romanick <[email protected]>2013-01-25 09:07:34 -0500
commit7a7b44b329c8090969587d1dab23721d47f82e4a (patch)
treee15923406c8513af904911c4eeee92a5ec210fd1 /src/glsl/ast_to_hir.cpp
parent13be1f4a103802ed936f2374d72b2f6979dafd58 (diff)
glsl: Add ir_variable::interface_type field
For variables that are in an interface block or are an instance of an interface block, this is the GLSL_TYPE_INTERFACE type for that block. Convert the ir_variable::is_in_uniform_block method added in the previous commit to use this field instead of ir_variable::uniform_block. v2: Fix the place-holder comment on ir_variable::interface_type. Suggested by Paul Berry. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 163c39aeb93..372ffde1b16 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -4268,6 +4268,7 @@ ast_uniform_block::hir(exec_list *instructions,
this->instance_name,
ir_var_uniform);
+ var->interface_type = block_type;
state->symbols->add_variable(var);
instructions->push_tail(var);
} else {
@@ -4277,6 +4278,7 @@ ast_uniform_block::hir(exec_list *instructions,
ralloc_strdup(state, fields[i].name),
ir_var_uniform);
var->uniform_block = ubo - state->uniform_blocks;
+ var->interface_type = block_type;
state->symbols->add_variable(var);
instructions->push_tail(var);