From: Tatsuyuki Ishi Date: Mon, 20 Mar 2023 07:51:09 +0000 (+0900) Subject: Fix missing dependency on sparse binds X-Git-Tag: upstream/1.3.5^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;p=platform%2Fupstream%2FVK-GL-CTS.git Fix missing dependency on sparse binds The affected tests below used a sparse binding but did not wait for the semaphore to be signaled before performing operations on the image. Fix the synchronization by waiting for the semaphore on all submissions that uses the sparse binding. Affects: dEQP-VK.image.mismatched_formats.sparse_image_read.* dEQP-VK.pipeline.*_sparse dEQP-VK.*.sparserendertarget.* Components: Vulkan VK-GL-CTS issue: 4336 Change-Id: If96817059394e368f142b224515f6546d901756b --- diff --git a/external/vulkancts/modules/vulkan/image/vktImageMismatchedFormatsTests.cpp b/external/vulkancts/modules/vulkan/image/vktImageMismatchedFormatsTests.cpp index b6ad82b..a99eb51 100644 --- a/external/vulkancts/modules/vulkan/image/vktImageMismatchedFormatsTests.cpp +++ b/external/vulkancts/modules/vulkan/image/vktImageMismatchedFormatsTests.cpp @@ -443,7 +443,8 @@ tcu::TestStatus MismatchedFormatTestInstance::iterate (void) vk.cmdDispatch(*cmdBuffer, 8, 8, 1); endCommandBuffer(vk, *cmdBuffer); - submitCommandsAndWait(vk, device, queue, *cmdBuffer); + const VkPipelineStageFlags stageBits[] = { VK_PIPELINE_STAGE_TRANSFER_BIT }; + submitCommandsAndWait(vk, device, queue, *cmdBuffer, false, 1u, 1u, &bindSemaphore.get(), stageBits); return tcu::TestStatus::pass("Passed"); } diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp index 29fe56f..165b755 100644 --- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp +++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp @@ -4528,7 +4528,15 @@ de::MovePtr MultisampleRenderer::render (void) const VkQueue queue = m_context.getUniversalQueue(); const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex(); - submitCommandsAndWait(vk, vkDevice, queue, m_cmdBuffer.get()); + if (m_backingMode == IMAGE_BACKING_MODE_SPARSE) + { + const VkPipelineStageFlags stageBits[] = { VK_PIPELINE_STAGE_TRANSFER_BIT }; + submitCommandsAndWait(vk, vkDevice, queue, m_cmdBuffer.get(), false, 1u, 1u, &m_bindSemaphore.get(), stageBits); + } + else + { + submitCommandsAndWait(vk, vkDevice, queue, m_cmdBuffer.get()); + } if (m_renderType == RENDER_TYPE_RESOLVE || m_renderType == RENDER_TYPE_DEPTHSTENCIL_ONLY || m_renderType == RENDER_TYPE_UNUSED_ATTACHMENT) { diff --git a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp index 863d581..9589281 100644 --- a/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp +++ b/external/vulkancts/modules/vulkan/renderpass/vktRenderPassSparseRenderTargetTests.cpp @@ -541,7 +541,8 @@ tcu::TestStatus SparseRenderTargetTestInstance::iterateInternal (void) endCommandBuffer(vkd, *commandBuffer); - submitCommandsAndWait(vkd, m_context.getDevice(), m_context.getUniversalQueue(), *commandBuffer); + const VkPipelineStageFlags stageBits[] = { VK_PIPELINE_STAGE_TRANSFER_BIT }; + submitCommandsAndWait(vkd, m_context.getDevice(), m_context.getUniversalQueue(), *commandBuffer, false, 1u, 1u, &m_bindSemaphore.get(), stageBits); return verify(); } @@ -628,7 +629,8 @@ tcu::TestStatus SparseRenderTargetTestInstance::iterateInternalDynamicRendering( endCommandBuffer(vkd, *cmdBuffer); - submitCommandsAndWait(vkd, m_context.getDevice(), m_context.getUniversalQueue(), *cmdBuffer); + const VkPipelineStageFlags stageBits[] = { VK_PIPELINE_STAGE_TRANSFER_BIT }; + submitCommandsAndWait(vkd, m_context.getDevice(), m_context.getUniversalQueue(), *cmdBuffer, false, 1u, 1u, &m_bindSemaphore.get(), stageBits); return verify(); }