summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp4
1 files changed, 4 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 2de767625af..8639544142e 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -319,6 +319,10 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog,
nir_shader *nir = glsl_to_nir(shader_program, stage, options);
+ nir_variable_mode mask =
+ (nir_variable_mode) (nir_var_shader_in | nir_var_shader_out);
+ nir_remove_dead_variables(nir, mask);
+
st_nir_opts(nir);
return nir;