From 3834e2d8fc14b38373a94afcbcd3ccca62654ebb Mon Sep 17 00:00:00 2001 From: Boris Zanin Date: Wed, 2 Jun 2021 13:06:00 +0200 Subject: [PATCH] Revert initial layout for depth/stencil attachment in makeRenderPass 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/vulkancts/framework/vulkan/vkObjUtil.cpp b/external/vulkancts/framework/vulkan/vkObjUtil.cpp index bd34e3f..f178c12 100644 --- a/external/vulkancts/framework/vulkan/vkObjUtil.cpp +++ b/external/vulkancts/framework/vulkan/vkObjUtil.cpp @@ -425,7 +425,7 @@ Move 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 = { -- 2.7.4