mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 23:10:11 +01:00
vulkan/android: amend a missing case for IMPLEMENTATION_DEFINED AHB
An AHB with IMPLEMENTATION_DEFINED format is commonly backed by NV12 or
XBGR8888. The former is the usual pick for camera <-> GPU interop, while
the latter is mostly only seen in Android CTS. Ideally, we can rely on
the queried fourcc to resolve everything instead of being on the
fallback path, but keeping this a minimal fix is easy for porting.
Cc: mesa-stable
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36866>
(cherry picked from commit 25a8e124e0)
This commit is contained in:
parent
29c6a25747
commit
215521c03b
2 changed files with 5 additions and 1 deletions
|
|
@ -1974,7 +1974,7 @@
|
|||
"description": "vulkan/android: amend a missing case for IMPLEMENTATION_DEFINED AHB",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -645,6 +645,10 @@ get_ahb_buffer_format_properties2(
|
|||
case DRM_FORMAT_NV12:
|
||||
external_format = VK_FORMAT_G8_B8R8_2PLANE_420_UNORM;
|
||||
break;
|
||||
case DRM_FORMAT_XBGR8888:
|
||||
/* This can be resolved from IMPLEMENTATION_DEFINED AHB format */
|
||||
external_format = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
break;
|
||||
default:;
|
||||
mesa_loge("Unsupported external DRM format: %d", info.drm_fourcc);
|
||||
return VK_ERROR_INVALID_EXTERNAL_HANDLE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue