anv: Use the new nir_opt_acquire_release_barriers pass

Improves performance of Phasmophobia with the "Eye Adaptation" video
setting enabled on Arc B570 by about 9.5%.

fossil-db results on Battlemage:

   Totals:
   Instrs: 148797922 -> 148797865 (-0.00%)
   Send messages: 7066341 -> 7066317 (-0.00%)
   Cycle count: 21459978352 -> 21459975048 (-0.00%)

   Totals from 8 (0.00% of 574410) affected shaders:
   Instrs: 4633 -> 4576 (-1.23%)
   Send messages: 479 -> 455 (-5.01%)
   Cycle count: 611886 -> 608582 (-0.54%)

Observed to cut 15% of sends in a Phasmophobia shader, 8.3% in a Far Cry
New Dawn shader, 7% in a Borderlands 3 DX11 shader, and 3.4-3.7% of
sends in a few Witcher 3 and Dark Souls 3 shaders.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33504>
This commit is contained in:
Kenneth Graunke
2025-02-07 19:32:04 -08:00
committed by Marge Bot
parent deb1d47155
commit 20222cd956

View File

@@ -2070,6 +2070,8 @@ anv_pipeline_nir_preprocess(struct anv_pipeline *pipeline,
brw_preprocess_nir(compiler, stage->nir, &opts);
NIR_PASS(_, stage->nir, nir_opt_barrier_modes);
NIR_PASS(_, stage->nir, nir_opt_acquire_release_barriers,
SCOPE_QUEUE_FAMILY);
nir_shader_gather_info(stage->nir, nir_shader_get_entrypoint(stage->nir));
}