[Mesa-dev] [PATCH 3/6] glsl: Propagate invariant/precise after lowering const arrays.

Kenneth Graunke kenneth at whitecape.org
Wed Jun 22 03:02:52 UTC 2016


The new uniform may need precise as well.

Fixes copy propagation of constant array uniforms in Tomb Raider shaders.

Cc: mesa-stable at lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/compiler/glsl/linker.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 15481ff..f0938a5 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -4768,6 +4768,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
 	 ;
 
       lower_const_arrays_to_uniforms(prog->_LinkedShaders[i]->ir);
+      propagate_invariance(prog->_LinkedShaders[i]->ir);
    }
 
    /* Validation for special cases where we allow sampler array indexing
-- 
2.9.0



More information about the mesa-dev mailing list