Mesa (master): aco: create acq+rel barriers instead of acq/rel

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 28 17:17:22 UTC 2020


Module: Mesa
Branch: master
Commit: ccfe9813fb80ebff5d1d3f70cb95f1831be8844e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ccfe9813fb80ebff5d1d3f70cb95f1831be8844e

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Wed Jul 22 11:47:20 2020 +0100

aco: create acq+rel barriers instead of acq/rel

NIR doesn't have atomic loads/stores, so we have to workaround that with
this for dEQP-VK.memory_model.* to pass.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4905>

---

 src/amd/compiler/aco_instruction_selection.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 100837bb98c..0a92788567a 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -6759,9 +6759,9 @@ void emit_memory_barrier(isel_context *ctx, nir_intrinsic_instr *instr) {
 
          unsigned nir_semantics = nir_intrinsic_memory_semantics(instr);
          if (nir_semantics & NIR_MEMORY_ACQUIRE)
-            semantics |= semantic_acquire;
+            semantics |= semantic_acquire | semantic_release;
          if (nir_semantics & NIR_MEMORY_RELEASE)
-            semantics |= semantic_release;
+            semantics |= semantic_acquire | semantic_release;
 
          assert(!(nir_semantics & (NIR_MEMORY_MAKE_AVAILABLE | NIR_MEMORY_MAKE_VISIBLE)));
 



More information about the mesa-commit mailing list