Revert initial layout for depth/stencil attachment in makeRenderPass
authorBoris Zanin <boris.zanin@mobica.com>
Wed, 2 Jun 2021 11:06:00 +0000 (13:06 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 1 Jul 2021 15:33:07 +0000 (15:33 +0000)
Return back previous initial depth/stencil attachment
layout, i.e. set it to
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL only
if loadOperation is VK_ATTACHMENT_LOAD_OP_LOAD.
Otherwise keep it undefined.

Setting vast range of affected tests, because it is
hard to determine which of the tests are using
affected by this function.

Affected tests:
 * dEQP-VK.*

Components: Framework

VK-GL-CTS public issue: 272

Change-Id: Ie96c8125144904fde5e2db6294f52947ff979424

external/vulkancts/framework/vulkan/vkObjUtil.cpp

index bd34e3f..f178c12 100644 (file)
@@ -425,7 +425,7 @@ Move<VkRenderPass> makeRenderPass (const DeviceInterface&                           vk,
        const bool                                                              hasColor                                                        = colorFormat != VK_FORMAT_UNDEFINED;
        const bool                                                              hasDepthStencil                                         = depthStencilFormat != VK_FORMAT_UNDEFINED;
        const VkImageLayout                                             initialLayoutColor                                      = loadOperation == VK_ATTACHMENT_LOAD_OP_LOAD ? VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_UNDEFINED;
-       const VkImageLayout                                             initialLayoutDepthStencil                       = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
+       const VkImageLayout                                             initialLayoutDepthStencil                       = loadOperation == VK_ATTACHMENT_LOAD_OP_LOAD ? VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL : VK_IMAGE_LAYOUT_UNDEFINED;
 
        const VkAttachmentDescription                   colorAttachmentDescription                      =
        {