SPIR-V generates very granular barriers, however HW and backends might not necessarily take advantage of those. This pass provides a general mechanism to combine such barriers.
bf432cd831c nir: Add pass to combine adjacent scoped memory barriers
src/compiler/Makefile.sources | 1 +
src/compiler/nir/meson.build | 1 +
src/compiler/nir/nir.h | 11 +++++
src/compiler/nir/nir_opt_barriers.c | 82 +++++++++++++++++++++++++++++++++++++
4 files changed, 95 insertions(+)