From: Rhys Perry Date: Mon, 27 Jul 2020 13:51:57 +0000 (+0100) Subject: spirv: make OpLoad/OpStore visibility/availablity barriers acquire/release X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b85c38a86f98ed0614afdaf31a8a66c20a7b51fb;p=mesa.git 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: --- 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); }