summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-12-14 12:00:14 -0800
committerIan Romanick <[email protected]>2013-01-25 09:07:34 -0500
commit13be1f4a103802ed936f2374d72b2f6979dafd58 (patch)
tree636053ac19725220449afbcb65310ec99e1c1ddf /src/glsl/link_uniforms.cpp
parent17e6f1904444be019cafa208495e3fe479cb86fd (diff)
glsl: Add ir_variable::is_in_uniform_block predicate
The way a variable is tested for this property is about to change, and this makes the code easier to modify. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/link_uniforms.cpp')
-rw-r--r--src/glsl/link_uniforms.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 25bba15bdbe..c639a3d16a4 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -228,7 +228,7 @@ public:
ir_variable *var)
{
ubo_var = NULL;
- if (var->uniform_block != -1) {
+ if (var->is_in_uniform_block()) {
struct gl_uniform_block *block =
&shader->UniformBlocks[var->uniform_block];
@@ -442,7 +442,7 @@ link_update_uniform_buffer_variables(struct gl_shader *shader)
foreach_list(node, shader->ir) {
ir_variable *const var = ((ir_instruction *) node)->as_variable();
- if ((var == NULL) || (var->uniform_block == -1))
+ if ((var == NULL) || !var->is_in_uniform_block())
continue;
assert(var->mode == ir_var_uniform);