anv: Don't reject Android image format if external props not supplied
authorChris Spencer <spencercw@gmail.com>
Wed, 23 Aug 2023 11:02:25 +0000 (12:02 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 24 Aug 2023 10:26:09 +0000 (10:26 +0000)
commit6a4e9b55e4ada27064390485ee9043d4a5ac115e
tree1adf6b9122146eb8281720cb9b8abf7fb3460b5e
parent5ceba97c2e18c848beb23016a7b4c190f0f5178b
anv: Don't reject Android image format if external props not supplied

anv_GetPhysicalDeviceImageFormatProperties2 returns 'not supported' if an
Android hardware buffer external memory handle type is specified, but no
external image format properties output struct is supplied. This struct is
optional, so we should populate it if present, but return successfully
either way.

This fixes an error when using ANV with hwui, which otherwise prevents the
system from booting.[1]

[1] https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/libs/hwui/renderthread/VulkanSurface.cpp;l=271;drc=ad3fb95aa2fe0be59d3e991ddc883592ab5542bc

Signed-off-by: Chris Spencer <spencercw@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24844>
src/intel/vulkan/anv_formats.c