From a1afe6184d28309f6550495d9dc50d69861ba406 Mon Sep 17 00:00:00 2001 From: Arkadiusz Sarwa Date: Tue, 23 Aug 2022 17:08:55 +0200 Subject: [PATCH] Fix barrier VK_AMD_buffer_marker Affected tests: dEQP-VK.api.buffer_marker.* Components: Vulkan VK-GL-CTS issue: 3854 Change-Id: Ia65c7ec44db3019125012b7d7e2d1b65e0f942f6 --- .../modules/vulkan/api/vktApiBufferMarkerTests.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiBufferMarkerTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferMarkerTests.cpp index 64a7246..f502902 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiBufferMarkerTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiBufferMarkerTests.cpp @@ -415,26 +415,26 @@ enum MemoryDepOwner MEMORY_DEP_OWNER_NON_MARKER = 2 }; -void computeMemoryDepBarrier(MemoryDepMethod method, - MemoryDepOwner owner, - VkAccessFlags* memoryDepAccess, - VkPipelineStageFlags* executionScope) +void computeMemoryDepBarrier(const MemoryDepParams& params, + MemoryDepOwner owner, + VkAccessFlags* memoryDepAccess, + VkPipelineStageFlags* executionScope) { DE_ASSERT(owner != MEMORY_DEP_OWNER_NOBODY); if (owner == MEMORY_DEP_OWNER_MARKER) { *memoryDepAccess = VK_ACCESS_TRANSFER_WRITE_BIT; - *executionScope = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT; + *executionScope = params.base.stage | VK_PIPELINE_STAGE_TRANSFER_BIT; } else { - if (method == MEMORY_DEP_COPY) + if (params.method == MEMORY_DEP_COPY) { *memoryDepAccess = VK_ACCESS_TRANSFER_WRITE_BIT; *executionScope = VK_PIPELINE_STAGE_TRANSFER_BIT; } - else if (method == MEMORY_DEP_DISPATCH) + else if (params.method == MEMORY_DEP_DISPATCH) { *memoryDepAccess = VK_ACCESS_SHADER_WRITE_BIT; *executionScope = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT; @@ -879,8 +879,8 @@ tcu::TestStatus bufferMarkerMemoryDep(Context& context, MemoryDepParams params) VkPipelineStageFlags srcStageMask; VkPipelineStageFlags dstStageMask; - computeMemoryDepBarrier(params.method, oldOwner, &memoryDep.srcAccessMask, &srcStageMask); - computeMemoryDepBarrier(params.method, newOwner, &memoryDep.dstAccessMask, &dstStageMask); + computeMemoryDepBarrier(params, oldOwner, &memoryDep.srcAccessMask, &srcStageMask); + computeMemoryDepBarrier(params, newOwner, &memoryDep.dstAccessMask, &dstStageMask); vk.cmdPipelineBarrier(*cmdBuffer, srcStageMask, dstStageMask, 0, 0, DE_NULL, 1, &memoryDep, 0, DE_NULL); } -- 2.7.4