This optimizes atomics with a uniform offset so that only one atomic operation is done in the subgroup.
For shaders which do a very large amount of atomics, this can significantly improve performance.
f83bc5beb80 nir: add pass to optimize uniform atomics
src/compiler/Makefile.sources | 1 +
src/compiler/nir/meson.build | 1 +
src/compiler/nir/nir.h | 2 +
src/compiler/nir/nir_opt_uniform_atomics.c | 257 +++++++++++++++++++++++++++++
4 files changed, 261 insertions(+)