Mesa (master): spirv: make OpLoad/OpStore visibility/availablity barriers acquire/release

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 1 17:29:35 UTC 2020


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Jul 27 14:51:57 2020 +0100

spirv: make OpLoad/OpStore visibility/availablity barriers acquire/release

I think these are needed to order the visibility/availability operation
with the access.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090>

---

 src/compiler/spirv/vtn_variables.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index fa78f804594..a8dfcd8e933 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -2620,6 +2620,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
       if (access & SpvMemoryAccessMakePointerVisibleMask) {
          SpvMemorySemanticsMask semantics =
             SpvMemorySemanticsMakeVisibleMask |
+            SpvMemorySemanticsAcquireMask |
             vtn_mode_to_memory_semantics(src->mode);
          vtn_emit_memory_barrier(b, scope, semantics);
       }
@@ -2669,6 +2670,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
       if (access & SpvMemoryAccessMakePointerAvailableMask) {
          SpvMemorySemanticsMask semantics =
             SpvMemorySemanticsMakeAvailableMask |
+            SpvMemorySemanticsReleaseMask |
             vtn_mode_to_memory_semantics(dest->mode);
          vtn_emit_memory_barrier(b, scope, semantics);
       }



More information about the mesa-commit mailing list