vulkan/android: Add helper to probe AHB support

GetPhysicalDeviceImageFormatProperties() must that an image {format,
flags, usage} combo is unsupported if gralloc will not be able to
perform the allocation.  The practical way to test this is to do a
small test allocation.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29090>
This commit is contained in:
Rob Clark
2024-05-06 10:47:42 -07:00
committed by Marge Bot
parent be0a893a2e
commit b9bbeb77c7
3 changed files with 51 additions and 0 deletions

View File

@@ -31,6 +31,12 @@ AHardwareBuffer_allocate(const AHardwareBuffer_Desc *desc,
return 0;
}
int
AHardwareBuffer_isSupported(const AHardwareBuffer_Desc* desc)
{
return 0;
}
const native_handle_t *
AHardwareBuffer_getNativeHandle(const AHardwareBuffer *buffer)
{