From b85c38a86f98ed0614afdaf31a8a66c20a7b51fb Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 27 Jul 2020 14:51:57 +0100 Subject: [PATCH] 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 Reviewed-by: Boris Brezillon Reviewed-by: Jason Ekstrand Part-of: --- 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); } -- 2.30.2