Commit 7edcf4a5 authored by Rhys Perry's avatar Rhys Perry Committed by Marge Bot
Browse files

aco: fix rebase error from GS copy shader support


Signed-off-by: Rhys Perry's avatarRhys Perry <pendingchaos02@gmail.com>
Fixes: f8f77126

 ('aco: implement GS copy shaders')
Reviewed-by: Daniel Schürmann's avatarDaniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <mesa/mesa!3601>
Part-of: <mesa/mesa!3601>
parent dd9bf7d2
...@@ -884,6 +884,21 @@ setup_nir(isel_context *ctx, nir_shader *nir) ...@@ -884,6 +884,21 @@ setup_nir(isel_context *ctx, nir_shader *nir)
NIR_PASS(more_algebraic, nir, nir_opt_algebraic); NIR_PASS(more_algebraic, nir, nir_opt_algebraic);
} }
/* Do late algebraic optimization to turn add(a, neg(b)) back into
* subs, then the mandatory cleanup after algebraic. Note that it may
* produce fnegs, and if so then we need to keep running to squash
* fneg(fneg(a)).
*/
bool more_late_algebraic = true;
while (more_late_algebraic) {
more_late_algebraic = false;
NIR_PASS(more_late_algebraic, nir, nir_opt_algebraic_late);
NIR_PASS_V(nir, nir_opt_constant_folding);
NIR_PASS_V(nir, nir_copy_prop);
NIR_PASS_V(nir, nir_opt_dce);
NIR_PASS_V(nir, nir_opt_cse);
}
/* cleanup passes */ /* cleanup passes */
nir_lower_load_const_to_scalar(nir); nir_lower_load_const_to_scalar(nir);
nir_opt_shrink_load(nir); nir_opt_shrink_load(nir);
......
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