glsl: Use constant_initializer instead of constant_value to determine whether to...
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 9 Oct 2015 00:32:41 +0000 (17:32 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 12 Oct 2015 17:15:13 +0000 (10:15 -0700)
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>
src/glsl/opt_dead_code.cpp

index 2cb7f41adef10f6e7d83110014fcf62c4fcc9948..071485ad31bfc7d7b21d59c9d584d419038f465a 100644 (file)
@@ -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