anv/android: handle R8G8B8X8 as R8G8B8A8

Fall through to common vk_ahb_format_to_image_format() to handle
R8G8B8X8 as R8G8B8A8.

Fixes issues with querying for format feature support when its handled
as R8G8B8.

Signed-off-by: Juston Li <justonli@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30080>
This commit is contained in:
Juston Li
2024-07-08 12:51:12 -07:00
committed by Marge Bot
parent 827812912d
commit ef58f2408f

View File

@@ -114,8 +114,6 @@ inline VkFormat
vk_format_from_android(unsigned android_format, unsigned android_usage)
{
switch (android_format) {
case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM:
return VK_FORMAT_R8G8B8_UNORM;
case AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420:
case HAL_PIXEL_FORMAT_NV12_Y_TILED_INTEL:
return VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;