diff options
author | Jason Ekstrand <[email protected]> | 2016-03-25 14:26:11 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-04-13 15:45:10 -0700 |
commit | b63a98b1211d22f759ae9c80b2270fe2d3b2639e (patch) | |
tree | 7f1e411c91ee2ad01b0df3fdddf48a3168d9f2ac /src/gallium/drivers | |
parent | 505a8fbdf8f2b6d2aaab5a04244cd3329f9dbe97 (diff) |
nir/dead_variables: Configurably work with any variable mode
The old version of the pass only worked on globals and locals and always
left inputs, outputs, uniforms, etc. alone.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_nir.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/vc4/vc4_program.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_nir.c index b3b6346c8a5..897b3b963be 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_nir.c @@ -142,7 +142,7 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s, } while (progress); - OPT_V(s, nir_remove_dead_variables); + OPT_V(s, nir_remove_dead_variables, nir_var_local); if (fd_mesa_debug & FD_DBG_DISASM) { debug_printf("----------------------\n"); diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index ca293bee182..eccc7ab413f 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -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) { |