diff --git a/CMakeLists.txt b/CMakeLists.txt index fab8b9902..3fe4aa403 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -382,6 +382,9 @@ endif() if(NOT DEFINED XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR) set(XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR ON) endif() +if(NOT DEFINED XRT_FEATURE_OPENXR_SPACE_UNBOUNDED) + set(XRT_FEATURE_OPENXR_SPACE_UNBOUNDED ON) +endif() # You can set this from a superproject to add a driver # All drivers must be listed in here to be included in the generated header! diff --git a/scripts/generate_oxr_ext_support.py b/scripts/generate_oxr_ext_support.py index ebd18144e..a5e51cf73 100755 --- a/scripts/generate_oxr_ext_support.py +++ b/scripts/generate_oxr_ext_support.py @@ -66,6 +66,7 @@ EXTENSIONS = ( ['XR_MND_headless'], ['XR_MND_swapchain_usage_input_attachment_bit'], ['XR_MSFT_hand_interaction', 'ALWAYS_DISABLED'], + ['XR_MSFT_unbounded_reference_space', 'XRT_FEATURE_OPENXR_SPACE_UNBOUNDED'], ['XR_OPPO_controller_interaction'], ['XR_EXTX_overlay'], ['XR_HTCX_vive_tracker_interaction', 'ALWAYS_DISABLED'], diff --git a/src/xrt/include/xrt/xrt_config_build.h.cmake_in b/src/xrt/include/xrt/xrt_config_build.h.cmake_in index 7970f61a3..302b300be 100644 --- a/src/xrt/include/xrt/xrt_config_build.h.cmake_in +++ b/src/xrt/include/xrt/xrt_config_build.h.cmake_in @@ -35,6 +35,7 @@ #cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT1 #cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT2 #cmakedefine XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR +#cmakedefine XRT_FEATURE_OPENXR_SPACE_UNBOUNDED #cmakedefine XRT_FEATURE_RENDERDOC #cmakedefine XRT_FEATURE_SERVICE #cmakedefine XRT_FEATURE_SERVICE_SYSTEMD diff --git a/src/xrt/state_trackers/oxr/oxr_extension_support.h b/src/xrt/state_trackers/oxr/oxr_extension_support.h index 3112157ba..08011b2b0 100644 --- a/src/xrt/state_trackers/oxr/oxr_extension_support.h +++ b/src/xrt/state_trackers/oxr/oxr_extension_support.h @@ -393,6 +393,18 @@ #endif +/* + * XR_MSFT_unbounded_reference_space + */ +#if defined(XR_MSFT_unbounded_reference_space) && defined(XRT_FEATURE_OPENXR_SPACE_UNBOUNDED) +#define OXR_HAVE_MSFT_unbounded_reference_space +#define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \ + _(MSFT_unbounded_reference_space, MSFT_UNBOUNDED_REFERENCE_SPACE) +#else +#define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) +#endif + + /* * XR_OPPO_controller_interaction */ @@ -539,6 +551,7 @@ OXR_EXTENSION_SUPPORT_MND_headless(_) \ OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \ OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) \ + OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \ OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) \ OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \ OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \