Check renderpass2 support in image clearing tests
authorRicardo Garcia <rgarcia@igalia.com>
Tue, 12 Nov 2019 12:22:22 +0000 (13:22 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 14 Nov 2019 13:12:44 +0000 (08:12 -0500)
This commit makes sure VK_KHR_create_renderpass2 is supported before
using it in some image clearing tests.

Affected tests:
dEQP-VK.api.image_clearing.*separate_layouts*

Components: Vulkan
VK-GL-CTS issue: 2101

Change-Id: Ib1a44b44f771bb31fd1ef798d2727370d143a1fa

external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp

index 33bfa6b..26aed40 100644 (file)
@@ -862,6 +862,10 @@ Move<VkRenderPass> ImageClearingTestInstance::createRenderPass (VkFormat format)
        }
        else
        {
+               // Make sure VK_KHR_create_renderpass2 is supported. Due to InstanceFactory1 being used and the render pass being created in
+               // the instance constructor and not every time, this is the best moment to check.
+               m_context.requireDeviceFunctionality("VK_KHR_create_renderpass2");
+
                VkImageLayout                                                           initialLayout                   = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
                VkImageLayout                                                           finalLayout                             = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
                VkAttachmentDescriptionStencilLayoutKHR         stencilLayouts                  =