The open source OpenXR runtime

a/vk: Fix up KHR_present_wait support

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2541>

+16 -14
+3
scripts/generate_vk_helpers.py
··· 185 185 Cmd("vkQueueInsertDebugUtilsLabelEXT", requires=("VK_EXT_debug_utils",)), 186 186 Cmd("vkSetDebugUtilsObjectNameEXT", requires=("VK_EXT_debug_utils",)), 187 187 Cmd("vkSetDebugUtilsObjectTagEXT", requires=("VK_EXT_debug_utils",)), 188 + None, 189 + Cmd("vkWaitForPresentKHR", requires=("VK_KHR_present_wait",)), 188 190 ] 189 191 190 192 ··· 302 304 "VK_KHR_maintenance2", 303 305 "VK_KHR_maintenance3", 304 306 "VK_KHR_maintenance4", 307 + "VK_KHR_present_wait", 305 308 "VK_KHR_synchronization2", 306 309 "VK_KHR_timeline_semaphore", 307 310 "VK_EXT_calibrated_timestamps",
+3 -2
src/xrt/auxiliary/vk/vk_bundle_init.c
··· 751 751 vk->has_KHR_maintenance2 = false; 752 752 vk->has_KHR_maintenance3 = false; 753 753 vk->has_KHR_maintenance4 = false; 754 + vk->has_KHR_present_wait = false; 754 755 vk->has_KHR_synchronization2 = false; 755 756 vk->has_KHR_timeline_semaphore = false; 756 757 vk->has_EXT_calibrated_timestamps = false; ··· 846 847 } 847 848 #endif // defined(VK_KHR_maintenance4) 848 849 849 - #if defined(VK_KHR_present_wait) && defined(VK_KHR_present_id) 850 + #if defined(VK_KHR_present_wait) 850 851 if (strcmp(ext, VK_KHR_PRESENT_WAIT_EXTENSION_NAME) == 0) { 851 852 vk->has_KHR_present_wait = true; 852 853 continue; 853 854 } 854 - #endif // defined(VK_KHR_present_wait) && defined(VK_KHR_present_id) 855 + #endif // defined(VK_KHR_present_wait) 855 856 856 857 #if defined(VK_KHR_synchronization2) 857 858 if (strcmp(ext, VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME) == 0) {
+4 -6
src/xrt/auxiliary/vk/vk_function_loaders.c
··· 85 85 vk->vkEnumerateDeviceExtensionProperties = GET_INS_PROC(vk, vkEnumerateDeviceExtensionProperties); 86 86 vk->vkEnumerateDeviceLayerProperties = GET_INS_PROC(vk, vkEnumerateDeviceLayerProperties); 87 87 88 - #if defined(VK_KHR_present_wait) 89 - vk->vkWaitForPresentKHR = GET_INS_PROC(vk, vkWaitForPresentKHR); 90 - 91 - #endif // defined(VK_KHR_present_wait) 92 - 93 88 #if defined(VK_EXT_calibrated_timestamps) 94 89 vk->vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = GET_INS_PROC(vk, vkGetPhysicalDeviceCalibrateableTimeDomainsEXT); 95 90 ··· 147 142 vk->vkSubmitDebugUtilsMessageEXT = GET_INS_PROC(vk, vkSubmitDebugUtilsMessageEXT); 148 143 vk->vkDestroyDebugUtilsMessengerEXT = GET_INS_PROC(vk, vkDestroyDebugUtilsMessengerEXT); 149 144 #endif // defined(VK_EXT_debug_utils) 150 - 151 145 // end of GENERATED instance loader code - do not modify - used by scripts 152 146 153 147 // clang-format on ··· 336 330 vk->vkQueueInsertDebugUtilsLabelEXT = GET_DEV_PROC(vk, vkQueueInsertDebugUtilsLabelEXT); 337 331 vk->vkSetDebugUtilsObjectNameEXT = GET_DEV_PROC(vk, vkSetDebugUtilsObjectNameEXT); 338 332 vk->vkSetDebugUtilsObjectTagEXT = GET_DEV_PROC(vk, vkSetDebugUtilsObjectTagEXT); 333 + 339 334 #endif // defined(VK_EXT_debug_utils) 340 335 336 + #if defined(VK_KHR_present_wait) 337 + vk->vkWaitForPresentKHR = GET_DEV_PROC(vk, vkWaitForPresentKHR); 338 + #endif // defined(VK_KHR_present_wait) 341 339 // end of GENERATED device loader code - do not modify - used by scripts 342 340 343 341 // clang-format on
+6 -6
src/xrt/auxiliary/vk/vk_helpers.h
··· 139 139 bool has_KHR_maintenance2; 140 140 bool has_KHR_maintenance3; 141 141 bool has_KHR_maintenance4; 142 + bool has_KHR_present_wait; 142 143 bool has_KHR_synchronization2; 143 144 bool has_KHR_timeline_semaphore; 144 145 bool has_EXT_calibrated_timestamps; ··· 148 149 bool has_EXT_global_priority; 149 150 bool has_EXT_image_drm_format_modifier; 150 151 bool has_EXT_robustness2; 151 - bool has_KHR_present_wait; 152 152 bool has_ANDROID_external_format_resolve; 153 153 bool has_GOOGLE_display_timing; 154 154 // end of GENERATED device extension code - do not modify - used by scripts ··· 220 220 PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR vkGetPhysicalDeviceExternalSemaphorePropertiesKHR; 221 221 PFN_vkEnumerateDeviceExtensionProperties vkEnumerateDeviceExtensionProperties; 222 222 PFN_vkEnumerateDeviceLayerProperties vkEnumerateDeviceLayerProperties; 223 - 224 - #if defined(VK_KHR_present_wait) 225 - PFN_vkWaitForPresentKHR vkWaitForPresentKHR; 226 - 227 - #endif // defined(VK_KHR_present_wait) 228 223 229 224 #if defined(VK_EXT_calibrated_timestamps) 230 225 PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vkGetPhysicalDeviceCalibrateableTimeDomainsEXT; ··· 463 458 PFN_vkQueueInsertDebugUtilsLabelEXT vkQueueInsertDebugUtilsLabelEXT; 464 459 PFN_vkSetDebugUtilsObjectNameEXT vkSetDebugUtilsObjectNameEXT; 465 460 PFN_vkSetDebugUtilsObjectTagEXT vkSetDebugUtilsObjectTagEXT; 461 + 466 462 #endif // defined(VK_EXT_debug_utils) 463 + 464 + #if defined(VK_KHR_present_wait) 465 + PFN_vkWaitForPresentKHR vkWaitForPresentKHR; 466 + #endif // defined(VK_KHR_present_wait) 467 467 468 468 // end of GENERATED device loader code - do not modify - used by scripts 469 469 };