nir/dead_variables: Configurably work with any variable mode
[mesa.git] / src / gallium / drivers / vc4 / vc4_program.c
index ca293bee182f8bf336bcb795de810dda103d2305..eccc7ab413f919fe424572f4aae74f79471ceda9 100644 (file)
@@ -1910,7 +1910,7 @@ vc4_shader_ntq(struct vc4_context *vc4, enum qstage stage,
 
         vc4_optimize_nir(c->s);
 
-        NIR_PASS_V(c->s, nir_remove_dead_variables);
+        NIR_PASS_V(c->s, nir_remove_dead_variables, nir_var_local);
         NIR_PASS_V(c->s, nir_convert_from_ssa, true);
 
         if (vc4_debug & VC4_DEBUG_SHADERDB) {