mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 19:30:12 +01:00
anv: drop anv_ahb_format_for_vk_format
The vk_image::ahb_format is for drivers that support more than the common explicit AHB formats. It is used on AHB image memory export allocation path, and more specifically vk_device_memory_create will use that AHB format to allocate the AHB out from gralloc. To be noted, export allocation path only deals with explicit format but not external format. So even with the obsolete HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL private format, we don't need such either as multi-planar formats are supposed to be reported as external format. Reviewed-by: Lucas Fryzek <lfryzek@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36866>
This commit is contained in:
parent
ef885eb9ac
commit
a34eb09c89
4 changed files with 0 additions and 21 deletions
|
|
@ -52,17 +52,6 @@ vk_format_from_android(unsigned android_format, unsigned android_usage)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned
|
||||
anv_ahb_format_for_vk_format(VkFormat vk_format)
|
||||
{
|
||||
switch (vk_format) {
|
||||
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
|
||||
return AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420;
|
||||
default:
|
||||
return vk_image_format_to_ahb_format(vk_format);
|
||||
}
|
||||
}
|
||||
|
||||
static VkResult
|
||||
get_ahw_buffer_format_properties2(
|
||||
VkDevice device_h,
|
||||
|
|
|
|||
|
|
@ -49,8 +49,6 @@ VkResult anv_image_init_from_gralloc(struct anv_device *device,
|
|||
const VkImageCreateInfo *base_info,
|
||||
const VkNativeBufferANDROID *gralloc_info);
|
||||
|
||||
unsigned anv_ahb_format_for_vk_format(VkFormat vk_format);
|
||||
|
||||
VkResult anv_import_ahw_memory(VkDevice device_h,
|
||||
struct anv_device_memory *mem);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,11 +40,6 @@ anv_image_init_from_gralloc(struct anv_device *device,
|
|||
return VK_ERROR_EXTENSION_NOT_PRESENT;
|
||||
}
|
||||
|
||||
unsigned anv_ahb_format_for_vk_format(VkFormat vk_format)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
VkResult
|
||||
anv_import_ahw_memory(VkDevice device_h,
|
||||
struct anv_device_memory *mem)
|
||||
|
|
|
|||
|
|
@ -1680,9 +1680,6 @@ anv_image_init(struct anv_device *device, struct anv_image *image,
|
|||
if (image->vk.external_handle_types &
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID) {
|
||||
image->from_ahb = true;
|
||||
#if DETECT_OS_ANDROID
|
||||
image->vk.ahb_format = anv_ahb_format_for_vk_format(image->vk.format);
|
||||
#endif
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue