mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
nak: run nir_opt_constant_folding after nak_nir_lower_load_store
It seems beneficial to run constant_folding after we lower our load/stores as it allows nir_opt_offsets to move even more constants into the base index. This will prevent perf regressions when moving more lowering into nak_nir_lower_load_store. Totals from 78165 (6.44% of 1212873) affected shaders: CodeSize: 1834431840 -> 1780937808 (-2.92%); split: -2.92%, +0.00% Number of GPRs: 5233739 -> 5234571 (+0.02%); split: -0.01%, +0.03% Static cycle count: 1855933069 -> 1851091739 (-0.26%); split: -0.26%, +0.00% Spills to memory: 12453 -> 12451 (-0.02%) Fills from memory: 12453 -> 12451 (-0.02%) Spills to reg: 69790 -> 69754 (-0.05%); split: -0.08%, +0.03% Fills from reg: 57092 -> 57072 (-0.04%); split: -0.07%, +0.03% Max warps/SM: 2572632 -> 2572196 (-0.02%); split: +0.01%, -0.02%
This commit is contained in:
parent
ce1a530d41
commit
356c279daa
1 changed files with 2 additions and 1 deletions
|
|
@ -1307,7 +1307,8 @@ nak_postprocess_nir(nir_shader *nir,
|
|||
UNREACHABLE("Unsupported shader stage");
|
||||
}
|
||||
|
||||
OPT(nir, nak_nir_lower_load_store, nak);
|
||||
if (OPT(nir, nak_nir_lower_load_store, nak))
|
||||
OPT(nir, nir_opt_constant_folding);
|
||||
|
||||
struct nir_opt_offsets_options nak_offset_options = {
|
||||
.max_offset_cb = nak_nir_max_imm_offset,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue