[Mesa-dev] [PATCH v2 13/21] anv: Prepare for transitioning to the requested final layout
Nanley Chery
nanleychery at gmail.com
Fri Jan 13 01:33:58 UTC 2017
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/intel/vulkan/anv_pass.c | 3 +++
src/intel/vulkan/anv_private.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c
index ea86fa9ff2..5df6330c6a 100644
--- a/src/intel/vulkan/anv_pass.c
+++ b/src/intel/vulkan/anv_pass.c
@@ -118,6 +118,7 @@ VkResult anv_CreateRenderPass(
subpass->input_attachments[j] = a;
pass->attachments[a].usage |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT;
pass->attachments[a].subpass_usage[i] |= ANV_SUBPASS_USAGE_INPUT;
+ pass->attachments[a].last_subpass_idx = i;
if (desc->pDepthStencilAttachment &&
a == desc->pDepthStencilAttachment->attachment)
@@ -134,6 +135,7 @@ VkResult anv_CreateRenderPass(
subpass->color_attachments[j] = a;
pass->attachments[a].usage |= VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
pass->attachments[a].subpass_usage[i] |= ANV_SUBPASS_USAGE_DRAW;
+ pass->attachments[a].last_subpass_idx = i;
}
}
@@ -156,6 +158,7 @@ VkResult anv_CreateRenderPass(
ANV_SUBPASS_USAGE_RESOLVE_SRC;
pass->attachments[a].subpass_usage[i] |=
ANV_SUBPASS_USAGE_RESOLVE_DST;
+ pass->attachments[a].last_subpass_idx = i;
}
}
}
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 9e7e8cfe3d..80e451b96e 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1767,6 +1767,9 @@ struct anv_render_pass_attachment {
/* An array, indexed by subpass id, of how the attachment will be used. */
enum anv_subpass_usage * subpass_usage;
+
+ /* The subpass id in which the attachment will be used last. */
+ uint32_t last_subpass_idx;
};
struct anv_render_pass {
--
2.11.0
More information about the mesa-dev
mailing list