[Mesa-dev] [PATCH 20/22] anv/pass: Get rid of anv_subpass_usage
Nanley Chery
nanleychery at gmail.com
Thu Apr 27 18:32:19 UTC 2017
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/intel/vulkan/anv_pass.c | 14 --------------
src/intel/vulkan/anv_private.h | 10 ----------
2 files changed, 24 deletions(-)
diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c
index 02b8f03fa5..de279d9d64 100644
--- a/src/intel/vulkan/anv_pass.c
+++ b/src/intel/vulkan/anv_pass.c
@@ -71,10 +71,6 @@ VkResult anv_CreateRenderPass(
}
anv_multialloc_add(&ma, &subpass_attachments, subpass_attachment_count);
- enum anv_subpass_usage *subpass_usages;
- anv_multialloc_add(&ma, &subpass_usages,
- pCreateInfo->subpassCount * pCreateInfo->attachmentCount);
-
if (!anv_multialloc_alloc2(&ma, &device->alloc, pAllocator,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT))
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
@@ -99,9 +95,7 @@ VkResult anv_CreateRenderPass(
att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp;
att->initial_layout = pCreateInfo->pAttachments[i].initialLayout;
att->final_layout = pCreateInfo->pAttachments[i].finalLayout;
- att->subpass_usage = subpass_usages;
assert(att->first_subpass_layout == VK_IMAGE_LAYOUT_UNDEFINED);
- subpass_usages += pass->subpass_count;
}
bool has_color = false, has_depth = false, has_input = false;
@@ -124,7 +118,6 @@ VkResult anv_CreateRenderPass(
if (a != VK_ATTACHMENT_UNUSED) {
has_input = true;
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;
init_first_subpass_layout(&pass->attachments[a],
@@ -146,7 +139,6 @@ VkResult anv_CreateRenderPass(
if (a != VK_ATTACHMENT_UNUSED) {
has_color = true;
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;
init_first_subpass_layout(&pass->attachments[a],
@@ -169,11 +161,6 @@ VkResult anv_CreateRenderPass(
pass->attachments[color_att].usage |=
VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
pass->attachments[a].usage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT;
-
- pass->attachments[color_att].subpass_usage[i] |=
- ANV_SUBPASS_USAGE_RESOLVE_SRC;
- pass->attachments[a].subpass_usage[i] |=
- ANV_SUBPASS_USAGE_RESOLVE_DST;
pass->attachments[a].last_subpass_idx = i;
init_first_subpass_layout(&pass->attachments[a],
@@ -190,7 +177,6 @@ VkResult anv_CreateRenderPass(
has_depth = true;
pass->attachments[a].usage |=
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
- pass->attachments[a].subpass_usage[i] |= ANV_SUBPASS_USAGE_DRAW;
pass->attachments[a].last_subpass_idx = i;
init_first_subpass_layout(&pass->attachments[a],
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 819fbea567..3218a85252 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2207,13 +2207,6 @@ struct anv_subpass {
bool has_resolve;
};
-enum anv_subpass_usage {
- ANV_SUBPASS_USAGE_DRAW = (1 << 0),
- ANV_SUBPASS_USAGE_INPUT = (1 << 1),
- ANV_SUBPASS_USAGE_RESOLVE_SRC = (1 << 2),
- ANV_SUBPASS_USAGE_RESOLVE_DST = (1 << 3),
-};
-
struct anv_render_pass_attachment {
/* TODO: Consider using VkAttachmentDescription instead of storing each of
* its members individually.
@@ -2228,9 +2221,6 @@ struct anv_render_pass_attachment {
VkImageLayout final_layout;
VkImageLayout first_subpass_layout;
- /* 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;
};
--
2.12.2
More information about the mesa-dev
mailing list