wsi/common: android: disable KHR_present_[wait/id]

Android's Vulkan loader provides KHR_android_surface and intercepts
during instance creation; it does not implement KHR_present_[wait/id]
nor does it pass the enablement of KHR_android_surface to the driver
so this check wasn't actually disabling KHR_present_[wait/id] for
Android.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33677>
This commit is contained in:
Juston Li 2025-02-21 10:35:02 -08:00 committed by Marge Bot
parent 6a29d2ed66
commit 7dd81ac9c2

View file

@ -1644,14 +1644,15 @@ wsi_GetDeviceGroupSurfacePresentModesKHR(VkDevice device,
bool
wsi_common_vk_instance_supports_present_wait(const struct vk_instance *instance)
{
#if DETECT_OS_ANDROID
/* Android's Vulkan loader does not provide KHR_present_wait or
* KHR_present_id for KHR_android_surface. */
return false;
#else
/* We can only expose KHR_present_wait and KHR_present_id
* if we are guaranteed support on all potential VkSurfaceKHR objects. */
if (instance->enabled_extensions.KHR_win32_surface ||
instance->enabled_extensions.KHR_android_surface) {
return false;
}
return true;
return !instance->enabled_extensions.KHR_win32_surface;
#endif
}
VkResult