nak: Use nir membar optimizations

Call nir_opt_barrier_modes and nir_opt_acquire_release_barriers.

Totals:
CodeSize: 5750619392 -> 5750618656 (-0.00%)
Number of GPRs: 16276896 -> 16276898 (+0.00%)
Static cycle count: 1497053946 -> 1497053776 (-0.00%); split: -0.00%, +0.00%
Spills to reg: 9143000 -> 9143006 (+0.00%)
Fills from reg: 6892354 -> 6892360 (+0.00%)

Totals from 14 (0.01% of 196502) affected shaders:
CodeSize: 786432 -> 785696 (-0.09%)
Number of GPRs: 1294 -> 1296 (+0.15%)
Static cycle count: 153230 -> 153060 (-0.11%); split: -0.14%, +0.03%
Spills to reg: 1360 -> 1366 (+0.44%)
Fills from reg: 947 -> 953 (+0.63%)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35055>
This commit is contained in:
Mel Henning
2025-05-20 19:53:30 -04:00
committed by Marge Bot
parent eb21e2471b
commit 3ab29ffca0

View File

@@ -327,6 +327,9 @@ nak_preprocess_nir(nir_shader *nir, const struct nak_compiler *nak)
/* Optimize but allow copies because we haven't lowered them yet */
optimize_nir(nir, nak, true /* allow_copies */);
OPT(nir, nir_opt_barrier_modes);
OPT(nir, nir_opt_acquire_release_barriers, SCOPE_QUEUE_FAMILY);
OPT(nir, nir_lower_load_const_to_scalar);
OPT(nir, nir_lower_var_copies);
OPT(nir, nir_lower_system_values);