From 7dd0a6e473a96f46b15d76d22dc0381937b835fa Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Wed, 19 Oct 2022 23:21:16 +0200 Subject: [PATCH] st/oxr: Disable XR_KHR_convert_timespec_time on windows This avoids a current CTS issue. --- scripts/generate_oxr_ext_support.py | 2 +- src/xrt/state_trackers/oxr/oxr_api_instance.c | 4 ++-- src/xrt/state_trackers/oxr/oxr_extension_support.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_oxr_ext_support.py b/scripts/generate_oxr_ext_support.py index 752fea21e..f60a58d96 100755 --- a/scripts/generate_oxr_ext_support.py +++ b/scripts/generate_oxr_ext_support.py @@ -40,7 +40,7 @@ EXTENSIONS = ( ['XR_KHR_composition_layer_depth', 'XRT_FEATURE_OPENXR_LAYER_DEPTH'], ['XR_KHR_composition_layer_equirect', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT1'], ['XR_KHR_composition_layer_equirect2', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT2'], - ['XR_KHR_convert_timespec_time', 'XR_USE_TIMESPEC'], + ['XR_KHR_convert_timespec_time', 'XR_USE_TIMESPEC', not_('XR_USE_PLATFORM_WIN32')], ['XR_KHR_D3D11_enable', 'XR_USE_GRAPHICS_API_D3D11'], ['XR_KHR_D3D12_enable', 'XR_USE_GRAPHICS_API_D3D12'], ['XR_KHR_loader_init', 'XR_USE_PLATFORM_ANDROID'], diff --git a/src/xrt/state_trackers/oxr/oxr_api_instance.c b/src/xrt/state_trackers/oxr/oxr_api_instance.c index e0417ec2c..97f5bb84e 100644 --- a/src/xrt/state_trackers/oxr/oxr_api_instance.c +++ b/src/xrt/state_trackers/oxr/oxr_api_instance.c @@ -355,7 +355,7 @@ oxr_xrPathToString( } // ---- XR_KHR_convert_timespec_time extension -#ifdef XR_USE_TIMESPEC +#ifdef OXR_HAVE_KHR_convert_timespec_time XrResult oxr_xrConvertTimespecTimeToTimeKHR(XrInstance instance, const struct timespec *timespecTime, XrTime *time) { @@ -390,7 +390,7 @@ oxr_xrConvertTimeToTimespecTimeKHR(XrInstance instance, XrTime time, struct time return oxr_instance_convert_time_to_timespec(&log, inst, time, timespecTime); } -#endif // XR_USE_TIMESPEC +#endif // OXR_HAVE_KHR_convert_timespec_time // ---- XR_KHR_win32_convert_performance_counter_time extension #ifdef XR_USE_PLATFORM_WIN32 diff --git a/src/xrt/state_trackers/oxr/oxr_extension_support.h b/src/xrt/state_trackers/oxr/oxr_extension_support.h index e0de0007a..1790d08a6 100644 --- a/src/xrt/state_trackers/oxr/oxr_extension_support.h +++ b/src/xrt/state_trackers/oxr/oxr_extension_support.h @@ -104,7 +104,7 @@ /* * XR_KHR_convert_timespec_time */ -#if defined(XR_KHR_convert_timespec_time) && defined(XR_USE_TIMESPEC) +#if defined(XR_KHR_convert_timespec_time) && defined(XR_USE_TIMESPEC) && (!defined(XR_USE_PLATFORM_WIN32)) #define OXR_HAVE_KHR_convert_timespec_time #define OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) _(KHR_convert_timespec_time, KHR_CONVERT_TIMESPEC_TIME) #else