summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index dcf8c2b638e..d0475fb538a 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -588,6 +588,9 @@ st_nir_link_shaders(nir_shader **producer, nir_shader **consumer, bool scalar)
{
nir_lower_io_arrays_to_elements(*producer, *consumer);
+ if (nir_link_constant_varyings(*producer, *consumer))
+ st_nir_opts(*consumer, scalar);
+
NIR_PASS_V(*producer, nir_remove_dead_variables, nir_var_shader_out);
NIR_PASS_V(*consumer, nir_remove_dead_variables, nir_var_shader_in);