From: Nanley Chery Date: Mon, 27 Feb 2017 17:38:25 +0000 (-0800) Subject: anv/pass: Fix size of anv_render_pass:subpass_attachments X-Git-Tag: upstream/17.1.0~1772 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f6a17c8e73c8edd181ce0afe0f8cbb1e726f65f;p=platform%2Fupstream%2Fmesa.git 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 --- diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 399ccb3..5bd205d 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 =