From f1f75fda9c1adfcf01a04114effe7d5e60663c33 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 15 Feb 2021 13:19:51 -0500 Subject: [PATCH] zink: add available|visible masks to all barriers in ntv we shouldn't need to consider whether these get added since we always want them Acked-by: Jason Ekstrand Part-of: --- src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c index 171cd4e..b466382 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c +++ b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c @@ -1450,7 +1450,7 @@ spirv_builder_emit_memory_barrier(struct spirv_builder *b, SpvScope scope, SpvMe spirv_buffer_prepare(&b->instructions, b->mem_ctx, 3); spirv_buffer_emit_word(&b->instructions, SpvOpMemoryBarrier | (3 << 16)); spirv_buffer_emit_word(&b->instructions, spirv_builder_const_uint(b, 32, scope)); - spirv_buffer_emit_word(&b->instructions, spirv_builder_const_uint(b, 32, semantics)); + spirv_buffer_emit_word(&b->instructions, spirv_builder_const_uint(b, 32, semantics | SpvMemorySemanticsMakeAvailableMask | SpvMemorySemanticsMakeVisibleMask)); } void @@ -1460,7 +1460,7 @@ spirv_builder_emit_control_barrier(struct spirv_builder *b, SpvScope scope, SpvS spirv_buffer_emit_word(&b->instructions, SpvOpControlBarrier | (4 << 16)); spirv_buffer_emit_word(&b->instructions, spirv_builder_const_uint(b, 32, scope)); spirv_buffer_emit_word(&b->instructions, spirv_builder_const_uint(b, 32, mem_scope)); - spirv_buffer_emit_word(&b->instructions, spirv_builder_const_uint(b, 32, semantics)); + spirv_buffer_emit_word(&b->instructions, spirv_builder_const_uint(b, 32, semantics | SpvMemorySemanticsMakeAvailableMask | SpvMemorySemanticsMakeVisibleMask)); } SpvId -- 2.7.4