From e2ad92eb22d4419a9ce702de143fed36ab7aa2ba Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 7 Dec 2021 17:33:55 +0100 Subject: [PATCH] radv: do not perform depth/stencil resolves for suspended render pass From the Vulkan spec: "Store and resolve operations are only performed at the end of a render pass instance that does not specify the VK_RENDERING_SUSPENDING_BIT_KHR flag." Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/amd/vulkan/radv_cmd_buffer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 803834cd514..6cfb8497482 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -7579,10 +7579,11 @@ radv_CmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfoKH }; } - if ((pRenderingInfo->pDepthAttachment && + if (((pRenderingInfo->pDepthAttachment && pRenderingInfo->pDepthAttachment->resolveMode != VK_RESOLVE_MODE_NONE) || (pRenderingInfo->pStencilAttachment && - pRenderingInfo->pStencilAttachment->resolveMode != VK_RESOLVE_MODE_NONE)) { + pRenderingInfo->pStencilAttachment->resolveMode != VK_RESOLVE_MODE_NONE)) && + !(pRenderingInfo->flags & VK_RENDERING_SUSPENDING_BIT_KHR)) { RADV_FROM_HANDLE(radv_image_view, resolve_iview, common_info->resolveImageView); ds_resolve_ref = (VkAttachmentReference2){.sType = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2,