Fix missing dependency on sparse binds
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / renderpass / vktRenderPassSparseRenderTargetTests.cpp
index badf470..9589281 100644 (file)
@@ -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();
 }
@@ -810,6 +812,14 @@ void checkSupport(Context& context, TestConfigType config)
 
        if (config.groupParams->renderingType == RENDERING_TYPE_DYNAMIC_RENDERING)
                context.requireDeviceFunctionality("VK_KHR_dynamic_rendering");
+
+       const auto& vki = context.getInstanceInterface();
+       const auto& physicalDevice = context.getPhysicalDevice();
+       VkImageFormatProperties formatProperties;
+       const auto result = vki.getPhysicalDeviceImageFormatProperties(physicalDevice, config.format, VK_IMAGE_TYPE_2D, VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, 0u, &formatProperties);
+       if (result == VK_ERROR_FORMAT_NOT_SUPPORTED) {
+               TCU_THROW(NotSupportedError, "Image format not supported");
+       }
 }
 
 void initTests (tcu::TestCaseGroup* group, const SharedGroupParams groupParams)