From: Samuel Pitoiset Date: Fri, 27 Apr 2018 08:53:13 +0000 (+0200) Subject: radv: compute the number of subpass attachments correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;ds=sidebyside;h=d8db5986cee83078e46895d695d698db87507019;p=mesa.git radv: compute the number of subpass attachments correctly Only count color attachments twice if resolves are used, also account for the depth stencil attachment if present. Cc: 18.0 18.1 Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Samuel Pitoiset --- diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c index d059af54f9b..a7d54d7d61b 100644 --- a/src/amd/vulkan/radv_pass.c +++ b/src/amd/vulkan/radv_pass.c @@ -87,8 +87,8 @@ VkResult radv_CreateRenderPass( subpass_attachment_count += desc->inputAttachmentCount + desc->colorAttachmentCount + - /* Count colorAttachmentCount again for resolve_attachments */ - desc->colorAttachmentCount; + (desc->pResolveAttachments ? desc->colorAttachmentCount : 0) + + (desc->pDepthStencilAttachment != NULL); } if (subpass_attachment_count) {