From c8de67ad94b84f2a336fbbd1b9ae00e4dca7ea14 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 8 May 2022 13:44:50 +0100 Subject: [PATCH] c/main: Make VK_KHR_external_[fence|semaphore]_fd optional --- src/xrt/compositor/main/comp_compositor.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/xrt/compositor/main/comp_compositor.c b/src/xrt/compositor/main/comp_compositor.c index 3b1231e70..62127372a 100644 --- a/src/xrt/compositor/main/comp_compositor.c +++ b/src/xrt/compositor/main/comp_compositor.c @@ -584,9 +584,7 @@ static const char *required_device_extensions[] = { #endif // Platform version of "external_fence" and "external_semaphore" -#if defined(XRT_GRAPHICS_SYNC_HANDLE_IS_FD) - VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, - VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME, +#if defined(XRT_GRAPHICS_SYNC_HANDLE_IS_FD) // Optional #elif defined(XRT_GRAPHICS_SYNC_HANDLE_IS_WIN32_HANDLE) VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, @@ -601,6 +599,17 @@ static const char *optional_device_extensions[] = { VK_GOOGLE_DISPLAY_TIMING_EXTENSION_NAME, // VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME, // +// Platform version of "external_fence" and "external_semaphore" +#if defined(XRT_GRAPHICS_SYNC_HANDLE_IS_FD) + VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, // + VK_KHR_EXTERNAL_FENCE_FD_EXTENSION_NAME, // + +#elif defined(XRT_GRAPHICS_SYNC_HANDLE_IS_WIN32_HANDLE) // Not optional + +#else +#error "Need port!" +#endif + #ifdef VK_KHR_timeline_semaphore VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME, #endif