aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-04-15 16:53:09 +0200
committerMarge Bot <[email protected]>2020-04-28 08:06:33 +0000
commit1b3e103d0bf1c506f9ec413be11af8bd207ad674 (patch)
tree03a300d5031d8bb62ecc92a9bfd388fd6d7cf27a /src
parent74e0a0a72398140a72c2f4a092982d5bef32ad14 (diff)
r600/sfn: Move removing of unused variables
It doesn't make sense to do this in the optimization loop Signed-off-by: Gert Wollny <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4714>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_nir.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/sfn/sfn_nir.cpp b/src/gallium/drivers/r600/sfn/sfn_nir.cpp
index e9a598703f3..ce416d92e17 100644
--- a/src/gallium/drivers/r600/sfn/sfn_nir.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_nir.cpp
@@ -529,9 +529,6 @@ optimize_once(nir_shader *shader)
NIR_PASS(progress, shader, nir_opt_conditional_discard);
NIR_PASS(progress, shader, nir_opt_dce);
NIR_PASS(progress, shader, nir_opt_undef);
-
- NIR_PASS(progress, shader, nir_remove_dead_variables, nir_var_shader_in);
- NIR_PASS(progress, shader, nir_remove_dead_variables, nir_var_shader_out);
return progress;
}
@@ -610,6 +607,10 @@ int r600_shader_from_nir(struct r600_context *rctx,
if (optimize)
while(optimize_once(sel->nir));
+ NIR_PASS_V(sel->nir, nir_remove_dead_variables, nir_var_shader_in);
+ NIR_PASS_V(sel->nir, nir_remove_dead_variables, nir_var_shader_out);
+
+
NIR_PASS_V(sel->nir, nir_lower_vars_to_scratch,
nir_var_function_temp,
40,