fe908ffefa
When the option is enabled, lower memory barriers to the unified nir_intrinsic_scoped_barrier. The translation of the following is based on https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gl_spirv.txt - memoryBarrier() - memoryBarrierBuffer() - memoryBarrierImage() - memoryBarrierShared() - groupMemoryBarrier() Also use scoped barrier for the memory counterparts of the GLSL (control) barrier() when the option is enabled. The execution part of a (control) barrier() remains using the old intrinsic. For memoryBarrierAtomicCounter() there's no corresponding nir_var_atomic_counter mode. Since atomic counters are lowered to SSBOs, use the nir_var_mem_ssbo mode in the scoped barrier instead. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Acked-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339>