From 7dd81ac9c2b5082dae914f4741225c5bbc989932 Mon Sep 17 00:00:00 2001 From: Juston Li Date: Fri, 21 Feb 2025 10:35:02 -0800 Subject: [PATCH] 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 Part-of: --- src/vulkan/wsi/wsi_common.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 97b19b454f0..fdfe5222026 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -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