anv/android: handle image bindings from gralloc buffers
When creating an image out of a swapchain on Android, the android layer call will detect a VkBindImageMemorySwapchainInfoKHR in the pNext chain of the vkBindImageMemory2() call and add a VkNativeBufferANDROID in the chain. This is what we should use as backing memory for that image. v2: Fix a couple of obvious mistakes (Tapani) v3: Silence build warning (Lionel) Fix invalid object argument to vk_error() (Lionel) Signed-off-by:Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes: bc3c71b8 ("anv: don't try to access Android swapchains") Cc: mesa-stable Closes: mesa/mesa#5180 Reviewed-by:
Tapani Pälli <tapani.palli@intel.com> Part-of: <mesa/mesa!12244> (cherry picked from commit 19b7bbba)
- .pick_status.json 1 addition, 1 deletion.pick_status.json
- src/intel/vulkan/anv_android.c 53 additions, 0 deletionssrc/intel/vulkan/anv_android.c
- src/intel/vulkan/anv_android.h 4 additions, 0 deletionssrc/intel/vulkan/anv_android.h
- src/intel/vulkan/anv_android_stubs.c 7 additions, 0 deletionssrc/intel/vulkan/anv_android_stubs.c
- src/intel/vulkan/anv_image.c 18 additions, 0 deletionssrc/intel/vulkan/anv_image.c