mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
gallivm: run nir_opt_algebraic_late
Without this, we're left with a bunch of medium-precision residue, like i2imp. And to avoid that the lowering intrudces left-over instructions, also run other lowering passes, similar to what other drivers do. Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185>
This commit is contained in:
parent
da5f346e6c
commit
1c82c05d58
1 changed files with 10 additions and 0 deletions
|
|
@ -2330,4 +2330,14 @@ void lp_build_opt_nir(struct nir_shader *nir)
|
|||
|
||||
} while (progress);
|
||||
nir_lower_bool_to_int32(nir);
|
||||
|
||||
do {
|
||||
progress = false;
|
||||
NIR_PASS(progress, nir, nir_opt_algebraic_late);
|
||||
if (progress) {
|
||||
NIR_PASS_V(nir, nir_copy_prop);
|
||||
NIR_PASS_V(nir, nir_opt_dce);
|
||||
NIR_PASS_V(nir, nir_opt_cse);
|
||||
}
|
||||
} while (progress);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue