radv: Implement vkGetSwapchainGrallocUsage2ANDROID.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 25 May 2020 01:58:16 +0000 (03:58 +0200)
committerMarge Bot <eric+marge@anholt.net>
Mon, 25 May 2020 15:34:44 +0000 (15:34 +0000)
commitbe784cc77b88fee2aad4b6ee3bb49e44d3bf1639
tree502b2c5fb4221d01a830e9a6ae1a9da93ed33dea
parent9a74746bd1f3bd28d4c4c7cba75e3245e1d25530
radv: Implement vkGetSwapchainGrallocUsage2ANDROID.

This was implemented in version 6 of the VK_ANDROID_native_buffer
extension and we only implement version 5. However, the Android
Vulkan loader only checks whether vkGetInstanceProcAddr for the
function is not NULL.

This all went wrong when we switched to the layer code from ANV.
Because the function may now be different per device, it adds fallback
functions that dispatch to the dispatch table. So if we didn't implement
the function we still returned a pointer to the dispatch function,
which made the Android Vulkan loader believe it was supported.

Dispatch functions:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/d555794f3032594dbef3623052103900138d2356/src/amd/vulkan/radv_entrypoints_gen.py#L328

Fixes: d555794f303 "radv: update entrypoints generation from ANV"
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2936
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5198>
src/amd/vulkan/radv_android.c