aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2019-10-14 12:07:23 -0700
committerJason Ekstrand <[email protected]>2020-02-11 13:26:06 -0600
commit84b791a4bb1b3eb15b9a820e9a5dc61a373392f3 (patch)
treee864e87ef5f061f8586ec5313b500f109a3b3990 /src
parent23037627359e739c42b194dec54875aefbb9d00b (diff)
anv: Drop unused anv_image_get_surface_for_aspect_mask()
Replaced by anv_image.c:get_surface() in: commit a62a97933578a813beb0d27cc8e404850f7fd302 Author: Lionel Landwerlin <[email protected]> CommitDate: Fri Oct 6 16:32:20 2017 +0100 Subject: anv: enable multiple planes per image/imageView Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3773>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_image.c59
-rw-r--r--src/intel/vulkan/anv_private.h4
2 files changed, 0 insertions, 63 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 28db8951534..1f9bc9ab3e8 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -2019,62 +2019,3 @@ anv_DestroyBufferView(VkDevice _device, VkBufferView bufferView,
vk_free2(&device->alloc, pAllocator, view);
}
-
-const struct anv_surface *
-anv_image_get_surface_for_aspect_mask(const struct anv_image *image,
- VkImageAspectFlags aspect_mask)
-{
- VkImageAspectFlags sanitized_mask;
-
- switch (aspect_mask) {
- case VK_IMAGE_ASPECT_COLOR_BIT:
- assert(image->aspects == VK_IMAGE_ASPECT_COLOR_BIT);
- sanitized_mask = VK_IMAGE_ASPECT_COLOR_BIT;
- break;
- case VK_IMAGE_ASPECT_DEPTH_BIT:
- assert(image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT);
- sanitized_mask = VK_IMAGE_ASPECT_DEPTH_BIT;
- break;
- case VK_IMAGE_ASPECT_STENCIL_BIT:
- assert(image->aspects & VK_IMAGE_ASPECT_STENCIL_BIT);
- sanitized_mask = VK_IMAGE_ASPECT_STENCIL_BIT;
- break;
- case VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT:
- /* FINISHME: The Vulkan spec (git a511ba2) requires support for
- * combined depth stencil formats. Specifically, it states:
- *
- * At least one of ename:VK_FORMAT_D24_UNORM_S8_UINT or
- * ename:VK_FORMAT_D32_SFLOAT_S8_UINT must be supported.
- *
- * Image views with both depth and stencil aspects are only valid for
- * render target attachments, in which case
- * cmd_buffer_emit_depth_stencil() will pick out both the depth and
- * stencil surfaces from the underlying surface.
- */
- if (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
- sanitized_mask = VK_IMAGE_ASPECT_DEPTH_BIT;
- } else {
- assert(image->aspects == VK_IMAGE_ASPECT_STENCIL_BIT);
- sanitized_mask = VK_IMAGE_ASPECT_STENCIL_BIT;
- }
- break;
- case VK_IMAGE_ASPECT_PLANE_0_BIT:
- assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
- sanitized_mask = VK_IMAGE_ASPECT_PLANE_0_BIT;
- break;
- case VK_IMAGE_ASPECT_PLANE_1_BIT:
- assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
- sanitized_mask = VK_IMAGE_ASPECT_PLANE_1_BIT;
- break;
- case VK_IMAGE_ASPECT_PLANE_2_BIT:
- assert((image->aspects & ~VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) == 0);
- sanitized_mask = VK_IMAGE_ASPECT_PLANE_2_BIT;
- break;
- default:
- unreachable("image does not have aspect");
- return NULL;
- }
-
- uint32_t plane = anv_image_aspect_to_plane(image->aspects, sanitized_mask);
- return &image->planes[plane].surface;
-}
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index d794a9db5dd..fa5c7cbf2a0 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -3876,10 +3876,6 @@ VkResult anv_image_create(VkDevice _device,
const VkAllocationCallbacks* alloc,
VkImage *pImage);
-const struct anv_surface *
-anv_image_get_surface_for_aspect_mask(const struct anv_image *image,
- VkImageAspectFlags aspect_mask);
-
enum isl_format
anv_isl_format_for_descriptor_type(VkDescriptorType type);