diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/anv_image.c | 59 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 4 |
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); |