diff options
author | Nanley Chery <[email protected]> | 2017-02-25 15:57:32 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2017-03-02 13:17:55 -0800 |
commit | c0223d052bd3a006ff851eabc5a2b5aad00f31a8 (patch) | |
tree | cf791639a78cc6a7ccb16dc0276d25541e71246f /src/intel/vulkan/anv_pass.c | |
parent | 8f6a17c8e73c8edd181ce0afe0f8cbb1e726f65f (diff) |
anv/pass: Store subpass attachment reference list
We'll loop through this array when performing automatic layout
transitions.
v2: Adjust formatting of an assignment (Jason Ekstrand)
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pass.c')
-rw-r--r-- | src/intel/vulkan/anv_pass.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c index 5bd205d2f03..4a1a340a3dc 100644 --- a/src/intel/vulkan/anv_pass.c +++ b/src/intel/vulkan/anv_pass.c @@ -86,9 +86,11 @@ VkResult anv_CreateRenderPass( const VkSubpassDescription *desc = &pCreateInfo->pSubpasses[i]; subpass_attachment_count += + pass->subpasses[i].attachment_count = desc->inputAttachmentCount + desc->colorAttachmentCount + - (desc->pResolveAttachments ? desc->colorAttachmentCount : 0); + (desc->pResolveAttachments ? desc->colorAttachmentCount : 0) + + (desc->pDepthStencilAttachment != NULL); } pass->subpass_attachments = @@ -108,6 +110,7 @@ VkResult anv_CreateRenderPass( subpass->input_count = desc->inputAttachmentCount; subpass->color_count = desc->colorAttachmentCount; + subpass->attachments = p; if (desc->inputAttachmentCount > 0) { subpass->input_attachments = p; @@ -169,7 +172,8 @@ VkResult anv_CreateRenderPass( if (desc->pDepthStencilAttachment) { uint32_t a = desc->pDepthStencilAttachment->attachment; - subpass->depth_stencil_attachment = *desc->pDepthStencilAttachment; + *p++ = subpass->depth_stencil_attachment = + *desc->pDepthStencilAttachment; if (a != VK_ATTACHMENT_UNUSED) { pass->attachments[a].usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; |