From 8f6a17c8e73c8edd181ce0afe0f8cbb1e726f65f Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Mon, 27 Feb 2017 09:38:25 -0800 Subject: anv/pass: Fix size of anv_render_pass:subpass_attachments Don't allocate space for resolve attachments if the subpass has none. Signed-off-by: Nanley Chery Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_pass.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 399ccb3970f..5bd205d2f03 100644 --- a/src/intel/vulkan/anv_pass.c +++ b/src/intel/vulkan/anv_pass.c @@ -88,8 +88,7 @@ VkResult anv_CreateRenderPass( subpass_attachment_count += desc->inputAttachmentCount + desc->colorAttachmentCount + - /* Count colorAttachmentCount again for resolve_attachments */ - desc->colorAttachmentCount; + (desc->pResolveAttachments ? desc->colorAttachmentCount : 0); } pass->subpass_attachments = -- cgit v1.2.3