Fix initial layout of depth stencil attachment
authorajerecze <adam.jereczek@intel.com>
Wed, 4 Nov 2020 10:11:08 +0000 (11:11 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 18 Nov 2020 07:54:38 +0000 (02:54 -0500)
This is a fix for regression introduced in 2e2e79bd.

The test was using the makeRenderpass utility from
framework/vulkan/vkObjUtil.cpp, however this utility was changed in 2e2e79bd to use
VK_IMAGE_LAYOUT_UNDEFINED as renderpass initial layout of depth stencil attachment,
while the image used in test is in VK_IMAGE_LAYOUT_UNDEFINED layout (not changed
since the image creation).

This commit changes dEQP-VK.imageless_framebuffer.depth_stencil to use makeRenderPass function
from vktImagelessFramebufferTests.cpp, rather than affected vkObjUtil.cpp utity.

(The makeRenderpass in vkObjUtil.cpp is shared with
dEQP-VK.pipeline.cache.graphics_tests.vertex_stage_fragment_stage test, which needed the change
from 2e2e79bd)

Component: Vulkan

VK-GL-CTS Issue: 2641

Affected tests:
dEQP-VK.imageless_framebuffer.depth_stencil

Change-Id: Id2ea5803cd010831db8f4f31b1d6b25dee051825

external/vulkancts/modules/vulkan/imageless_framebuffer/vktImagelessFramebufferTests.cpp

index 72c5c19..3f27064 100644 (file)
@@ -1410,6 +1410,8 @@ tcu::TestStatus DepthImagelessTestInstance::iterate (void)
        const VkQueue                                   queue                           = m_context.getUniversalQueue();
        Allocator&                                              allocator                       = m_context.getDefaultAllocator();
 
+       const deUint32                                  sampleCount                     = 1u;
+       const VkSampleCountFlagBits             sampleCountFlag         = sampleCountBitFromSampleCount(sampleCount);
        const tcu::Vec4                                 clearColor                      = tcu::Vec4(0.0f, 0.0f, 0.0f, 1.0f);
        const VkFormat                                  colorFormat                     = m_parameters.colorFormat;
        const VkDeviceSize                              colorBufferSize         = m_imageExtent2D.width * m_imageExtent2D.height * tcu::getPixelSize(mapVkFormat(colorFormat));
@@ -1443,7 +1445,7 @@ tcu::TestStatus DepthImagelessTestInstance::iterate (void)
 
        const Unique<VkShaderModule>    vertModule                      (createShaderModule             (vk, device, m_context.getBinaryCollection().get("vert"), 0u));
        const Unique<VkShaderModule>    fragModule                      (createShaderModule             (vk, device, m_context.getBinaryCollection().get("frag"), 0u));
-       const Unique<VkRenderPass>              renderPass                      (makeRenderPass                 (vk, device, colorFormat, dsFormat));
+       const Unique<VkRenderPass>              renderPass                      (makeRenderPass                 (vk, device, colorFormat, dsFormat, sampleCountFlag));
        const Unique<VkFramebuffer>             framebuffer                     (makeFramebuffer                (vk, device, *renderPass, m_imageExtent2D, &colorFormat, m_colorImageUsage, &dsFormat, m_dsImageUsage));
        const Unique<VkPipelineLayout>  pipelineLayout          (makePipelineLayout             (vk, device));
        const Unique<VkPipeline>                pipeline                        (makeGraphicsPipeline   (vk, device, *pipelineLayout, *renderPass, *vertModule, *fragModule, m_imageExtent2D, ASPECT_DEPTH_STENCIL));