summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_dead_code.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/opt_dead_code.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/opt_dead_code.cpp')
-rw-r--r--src/glsl/opt_dead_code.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_dead_code.cpp b/src/glsl/opt_dead_code.cpp
index dad307af779..78d31cfcb3f 100644
--- a/src/glsl/opt_dead_code.cpp
+++ b/src/glsl/opt_dead_code.cpp
@@ -106,7 +106,7 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned)
if (entry->var->mode == ir_var_uniform &&
(uniform_locations_assigned ||
entry->var->constant_value ||
- entry->var->uniform_block != -1))
+ entry->var->is_in_uniform_block()))
continue;
entry->var->remove();