summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2018-04-27 10:53:13 +0200
committerDylan Baker <dylan@pnwbakers.com>2018-05-01 14:19:55 -0700
commit4cf3a2b06469ecc0815d66a62026bbe3f6889f8f (patch)
tree4c8555f37951407d35f3a461e79a7dfc0681f9bd
parent2fe5a43995d9901d6fc5d73bfe2b1d70d44601bb (diff)
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> (cherry picked from commit d8db5986cee83078e46895d695d698db87507019)
-rw-r--r--src/amd/vulkan/radv_pass.c4
1 files changed, 2 insertions, 2 deletions
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) {