mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 04:10:10 +01:00
zink: run nir_opt_algebraic_late
This pass is needed to finish off the [ui]2imp lowering. Follow what other drivers do and perform some dead-code elimimation etc when lowering happens. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10101>
This commit is contained in:
parent
204cd1b893
commit
3f4eacb38a
1 changed files with 10 additions and 0 deletions
|
|
@ -444,6 +444,16 @@ optimize_nir(struct nir_shader *s)
|
|||
NIR_PASS(progress, s, nir_opt_undef);
|
||||
NIR_PASS(progress, s, zink_nir_lower_b2b);
|
||||
} while (progress);
|
||||
|
||||
do {
|
||||
progress = false;
|
||||
NIR_PASS(progress, s, nir_opt_algebraic_late);
|
||||
if (progress) {
|
||||
NIR_PASS_V(s, nir_copy_prop);
|
||||
NIR_PASS_V(s, nir_opt_dce);
|
||||
NIR_PASS_V(s, nir_opt_cse);
|
||||
}
|
||||
} while (progress);
|
||||
}
|
||||
|
||||
/* check for a genuine gl_PointSize output vs one from nir_lower_point_size_mov */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue