Commit 1b3e103d authored by Gert Wollny's avatar Gert Wollny Committed by Marge Bot

r600/sfn: Move removing of unused variables

It doesn't make sense to do this in the optimization loop
Signed-off-by: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
Part-of: <mesa/mesa!4714>
parent 74e0a0a7
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment