aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/linker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r--src/compiler/glsl/linker.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 281d59d12a5..c52c665a4c2 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -5211,7 +5211,8 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
linker_optimisation_loop(ctx, prog->_LinkedShaders[i]->ir, i);
/* Call opts after lowering const arrays to copy propagate things. */
- if (lower_const_arrays_to_uniforms(prog->_LinkedShaders[i]->ir, i))
+ if (ctx->Const.GLSLLowerConstArrays &&
+ lower_const_arrays_to_uniforms(prog->_LinkedShaders[i]->ir, i))
linker_optimisation_loop(ctx, prog->_LinkedShaders[i]->ir, i);
propagate_invariance(prog->_LinkedShaders[i]->ir);