summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2016-01-27 18:03:34 -0800
committerChad Versace <[email protected]>2016-01-28 10:03:00 -0800
commit22258e279d5553f3c2f6983ed569169a0094b90f (patch)
treef756063424c03a92560a7495065ec0fea2c12420
parent3d863e8dadcc3c2d21d7ecf9219c9255d6a2f949 (diff)
anv: Add anv_subpass::has_resolve
Indicates that the subpass has at least one resolve attachment.
-rw-r--r--src/vulkan/anv_pass.c6
-rw-r--r--src/vulkan/anv_private.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/src/vulkan/anv_pass.c b/src/vulkan/anv_pass.c
index ccd8cedf561..a8e85664d48 100644
--- a/src/vulkan/anv_pass.c
+++ b/src/vulkan/anv_pass.c
@@ -118,8 +118,10 @@ VkResult anv_CreateRenderPass(
p += desc->colorAttachmentCount;
for (uint32_t j = 0; j < desc->colorAttachmentCount; j++) {
- subpass->resolve_attachments[j]
- = desc->pResolveAttachments[j].attachment;
+ uint32_t a = desc->pResolveAttachments[j].attachment;
+ subpass->resolve_attachments[j] = a;
+ if (a != VK_ATTACHMENT_UNUSED)
+ subpass->has_resolve = true;
}
}
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h
index 6e44e88e10c..cad1e1fd5ff 100644
--- a/src/vulkan/anv_private.h
+++ b/src/vulkan/anv_private.h
@@ -1712,6 +1712,9 @@ struct anv_subpass {
uint32_t * color_attachments;
uint32_t * resolve_attachments;
uint32_t depth_stencil_attachment;
+
+ /** Subpass has at least one resolve attachment */
+ bool has_resolve;
};
struct anv_render_pass_attachment {