summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_dead_code.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2015-10-08 17:32:41 -0700
committerIan Romanick <ian.d.romanick@intel.com>2015-10-12 10:15:13 -0700
commit5bc68f0f2b80b21997435742af74c49eb72891f7 (patch)
tree73ba768bf91da1f156d893e7a502767117a3436a /src/glsl/opt_dead_code.cpp
parent313372cae8e10e4b9a3de093d65c0a0d8954bb0d (diff)
downloadexternal_mesa3d-5bc68f0f2b80b21997435742af74c49eb72891f7.zip
external_mesa3d-5bc68f0f2b80b21997435742af74c49eb72891f7.tar.gz
external_mesa3d-5bc68f0f2b80b21997435742af74c49eb72891f7.tar.bz2
glsl: Use constant_initializer instead of constant_value to determine whether to keep an unused uniform
This even matches the comment "uniform initializers are precious, and could get used by another stage." Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
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 2cb7f41..071485a 100644
--- a/src/glsl/opt_dead_code.cpp
+++ b/src/glsl/opt_dead_code.cpp
@@ -103,7 +103,7 @@ do_dead_code(exec_list *instructions, bool uniform_locations_assigned)
*/
if (entry->var->data.mode == ir_var_uniform ||
entry->var->data.mode == ir_var_shader_storage) {
- if (uniform_locations_assigned || entry->var->constant_value)
+ if (uniform_locations_assigned || entry->var->constant_initializer)
continue;
/* Section 2.11.6 (Uniform Variables) of the OpenGL ES 3.0.3 spec