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 <mesa-stable@lists.freedesktop.org> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
e66f64c285
commit
d8db5986ce
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue