[Mesa-dev] [PATCH] radv: compute the number of subpass attachments correctly
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Apr 27 08:53:13 UTC 2018
Only count color attachments twice if resolves are used, also
account for the depth stencil attachment if present.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_pass.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_pass.c b/src/amd/vulkan/radv_pass.c
index a1aaccb20e..cef56cba03 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) {
--
2.17.0
More information about the mesa-dev
mailing list