Module: Mesa
Branch: master
Commit: 5bc68f0f2b80b21997435742af74c49eb72891f7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5bc68f0f2b80b21997435742af74c49eb72891f7

Author: Ian Romanick <[email protected]>
Date:   Thu Oct  8 17:32:41 2015 -0700

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 <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Cc: "10.6 11.0" <[email protected]>

---

 src/glsl/opt_dead_code.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to