mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
agx: Run opt_idiv_const after lowering texture
Shaves 10 instructions off the cube map array lowering. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25052>
This commit is contained in:
parent
49951ef3cc
commit
fb60626260
1 changed files with 5 additions and 0 deletions
|
|
@ -2724,6 +2724,11 @@ agx_preprocess_nir(nir_shader *nir, bool support_lod_bias, bool allow_mediump,
|
|||
NIR_PASS_V(nir, nir_opt_dce);
|
||||
NIR_PASS_V(nir, agx_nir_lower_texture, support_lod_bias);
|
||||
|
||||
/* 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_V(nir, nir_opt_idiv_const, 16);
|
||||
|
||||
nir_lower_idiv_options idiv_options = {
|
||||
.allow_fp16 = true,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue