Skip to content

anv: Don't reject Android image format if external props not supplied

Chris Spencer requested to merge spencercw/mesa:anv-external-mem into main

What does this MR do and why?

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

Merge request reports