[Mesa-dev] [PATCH 22/24] anv/pass: Get rid of anv_subpass_usage
Nanley Chery
nanleychery at gmail.com
Thu May 11 19:05:29 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 bb7ee45098..597939ab66 100644
--- a/src/intel/vulkan/anv_pass.c
+++ b/src/intel/vulkan/anv_pass.c
@@ -73,10 +73,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);
@@ -102,8 +98,6 @@ VkResult anv_CreateRenderPass(
att->initial_layout = pCreateInfo->pAttachments[i].initialLayout;
att->final_layout = pCreateInfo->pAttachments[i].finalLayout;
att->first_subpass_layout = VK_IMAGE_LAYOUT_UNDEFINED;
- att->subpass_usage = subpass_usages;
- subpass_usages += pass->subpass_count;
}
bool has_color = false, has_depth = false, has_input = false;
@@ -127,7 +121,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],
@@ -149,7 +142,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],
@@ -172,11 +164,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],
@@ -193,7 +180,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 fa5fc42f1f..d45a225cc1 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2288,13 +2288,6 @@ anv_subpass_view_count(const struct anv_subpass *subpass)
return MAX2(1, _mesa_bitcount(subpass->view_mask));
}
-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.
@@ -2309,9 +2302,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