mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
agx: defer nir_opt_idiv_const
noticed in GS work. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
This commit is contained in:
parent
53e3e44eb3
commit
d3adef3164
1 changed files with 10 additions and 10 deletions
|
|
@ -3773,16 +3773,6 @@ agx_preprocess_nir(nir_shader *nir)
|
|||
/* Clean up deref gunk after lowering I/O */
|
||||
NIR_PASS(_, nir, nir_opt_dce);
|
||||
|
||||
/* Runs before we lower away idiv, to work at all. But runs after lowering
|
||||
* textures, since the cube map array lowering generates division by 6.
|
||||
*/
|
||||
NIR_PASS(_, nir, nir_opt_idiv_const, 16);
|
||||
|
||||
nir_lower_idiv_options idiv_options = {
|
||||
.allow_fp16 = true,
|
||||
};
|
||||
|
||||
NIR_PASS(_, nir, nir_lower_idiv, &idiv_options);
|
||||
NIR_PASS(_, nir, nir_lower_frexp);
|
||||
NIR_PASS(_, nir, nir_lower_alu);
|
||||
NIR_PASS(_, nir, nir_lower_alu_to_scalar, NULL, NULL);
|
||||
|
|
@ -3802,6 +3792,16 @@ agx_preprocess_nir(nir_shader *nir)
|
|||
*/
|
||||
agx_optimize_loop_nir(nir);
|
||||
|
||||
/* Lower idiv after an optimization loop so we can constant fold more before
|
||||
* nir_opt_idiv_const.
|
||||
*/
|
||||
NIR_PASS(_, nir, nir_opt_idiv_const, 16);
|
||||
|
||||
nir_lower_idiv_options idiv_options = {
|
||||
.allow_fp16 = true,
|
||||
};
|
||||
|
||||
NIR_PASS(_, nir, nir_lower_idiv, &idiv_options);
|
||||
NIR_PASS(_, nir, nir_opt_deref);
|
||||
NIR_PASS(_, nir, nir_lower_vars_to_ssa);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue