radv: remove dead shader input/output variables
[mesa.git] / src / amd / vulkan / radv_shader.c
index ee09a0fa62b303201d7e3ce62785bf7ef4693d96..6466bad5cae2917f75641479ac5905d40e8a1b79 100644 (file)
@@ -249,7 +249,7 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively,
                NIR_PASS(progress, shader, nir_opt_copy_prop_vars);
                NIR_PASS(progress, shader, nir_opt_dead_write_vars);
                NIR_PASS(progress, shader, nir_remove_dead_variables,
-                        nir_var_function_temp);
+                        nir_var_function_temp | nir_var_shader_in | nir_var_shader_out);
 
                 NIR_PASS_V(shader, nir_lower_alu_to_scalar, NULL, NULL);
                 NIR_PASS_V(shader, nir_lower_phis_to_scalar);