[Mesa-dev] [PATCH 12/18] anv/pass: Fix size of anv_render_pass:subpass_attachments

Nanley Chery nanleychery at gmail.com
Tue Feb 28 01:20:20 UTC 2017


Don't allocate space for resolve attachments if the subpass has none.

Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
 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 399ccb3970..5bd205d2f0 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 =
-- 
2.11.1



More information about the mesa-dev mailing list