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>
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) {