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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f6a17c8e73c8edd181ce0afe0f8cbb1e726f65f;p=mesa.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 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 =