Mesa (18.0): radv: compute the number of subpass attachments correctly
Juan Antonio Suárez Romero
jasuarez at kemper.freedesktop.org
Thu May 3 16:52:06 UTC 2018
Module: Mesa
Branch: 18.0
Commit: 97841a8f025b3994f1f7d8c163d63f96e955093e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=97841a8f025b3994f1f7d8c163d63f96e955093e
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Apr 27 10:53:13 2018 +0200
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 at lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
(cherry picked from commit d8db5986cee83078e46895d695d698db87507019)
---
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 a52dae39d9..6e80467eb0 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) {
More information about the mesa-commit
mailing list