diff --git a/CMakeLists.txt b/CMakeLists.txt index 54c23bc96..8355ee634 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,9 @@ endif() if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT) set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT OFF) endif() +if(NOT DEFINED XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY) + set(XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY OFF) +endif() # Most users won't touch these. mark_as_advanced(XRT_FEATURE_COMPOSITOR_MAIN XRT_FEATURE_OPENXR) @@ -238,13 +241,14 @@ message(STATUS "# FFMPEG: ${XRT_HAVE_FFMPEG}") message(STATUS "# SDL2: ${XRT_HAVE_SDL2}") message(STATUS "# SYSTEM_CJSON: ${XRT_HAVE_SYSTEM_CJSON}") message(STATUS "#") -message(STATUS "# FEATURE_COMPOSITOR_MAIN: ${XRT_FEATURE_COMPOSITOR_MAIN}") -message(STATUS "# FEATURE_SERVICE: ${XRT_FEATURE_SERVICE}") -message(STATUS "# FEATURE_OPENXR: ${XRT_FEATURE_OPENXR}") -message(STATUS "# FEATURE_OPENXR_LAYER_DEPTH: ${XRT_FEATURE_OPENXR_LAYER_DEPTH}") -message(STATUS "# FEATURE_OPENXR_LAYER_CUBE: ${XRT_FEATURE_OPENXR_LAYER_CUBE}") -message(STATUS "# FEATURE_OPENXR_LAYER_CYLINDER: ${XRT_FEATURE_OPENXR_LAYER_CYLINDER}") -message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT}") +message(STATUS "# FEATURE_COMPOSITOR_MAIN: ${XRT_FEATURE_COMPOSITOR_MAIN}") +message(STATUS "# FEATURE_SERVICE: ${XRT_FEATURE_SERVICE}") +message(STATUS "# FEATURE_OPENXR: ${XRT_FEATURE_OPENXR}") +message(STATUS "# FEATURE_OPENXR_LAYER_DEPTH: ${XRT_FEATURE_OPENXR_LAYER_DEPTH}") +message(STATUS "# FEATURE_OPENXR_LAYER_CUBE: ${XRT_FEATURE_OPENXR_LAYER_CUBE}") +message(STATUS "# FEATURE_OPENXR_LAYER_CYLINDER: ${XRT_FEATURE_OPENXR_LAYER_CYLINDER}") +message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT}") +message(STATUS "# FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY: ${XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY}") message(STATUS "#") message(STATUS "# DRIVER_ARDUINO: ${XRT_BUILD_DRIVER_ARDUINO}") message(STATUS "# DRIVER_DAYDREAM: ${XRT_BUILD_DRIVER_DAYDREAM}") diff --git a/scripts/generate_oxr_ext_support.py b/scripts/generate_oxr_ext_support.py index 784c11235..dada649de 100755 --- a/scripts/generate_oxr_ext_support.py +++ b/scripts/generate_oxr_ext_support.py @@ -18,7 +18,8 @@ EXTENSIONS = ( ['XR_KHR_composition_layer_depth', 'XRT_FEATURE_OPENXR_LAYER_DEPTH'], ['XR_KHR_composition_layer_cube', 'XRT_FEATURE_OPENXR_LAYER_CUBE'], ['XR_KHR_composition_layer_cylinder', 'XRT_FEATURE_OPENXR_LAYER_CYLINDER'], - ['XR_KHR_composition_layer_equirect', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT'], + ['XR_KHR_composition_layer_equirect', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY'], + ['XR_KHR_composition_layer_equirect2', 'XRT_FEATURE_OPENXR_LAYER_EQUIRECT'], ['XR_EXT_debug_utils'], ['XR_MND_headless'], ['XR_MND_swapchain_usage_input_attachment_bit'], 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 50d3e5713..4b4c30d48 100644 --- a/src/xrt/include/xrt/xrt_config_build.h.cmake_in +++ b/src/xrt/include/xrt/xrt_config_build.h.cmake_in @@ -18,3 +18,5 @@ #cmakedefine XRT_FEATURE_OPENXR_LAYER_DEPTH #cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT + +#cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY diff --git a/src/xrt/state_trackers/oxr/oxr_extension_support.h b/src/xrt/state_trackers/oxr/oxr_extension_support.h index aeaa276b7..712f4329c 100644 --- a/src/xrt/state_trackers/oxr/oxr_extension_support.h +++ b/src/xrt/state_trackers/oxr/oxr_extension_support.h @@ -123,7 +123,7 @@ * XR_KHR_composition_layer_equirect */ #if defined(XR_KHR_composition_layer_equirect) && \ - defined(XRT_FEATURE_OPENXR_LAYER_EQUIRECT) + defined(XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY) #define OXR_HAVE_KHR_composition_layer_equirect #define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \ _(KHR_composition_layer_equirect, KHR_COMPOSITION_LAYER_EQUIRECT) @@ -132,6 +132,19 @@ #endif +/* + * XR_KHR_composition_layer_equirect2 + */ +#if defined(XR_KHR_composition_layer_equirect2) && \ + defined(XRT_FEATURE_OPENXR_LAYER_EQUIRECT) +#define OXR_HAVE_KHR_composition_layer_equirect2 +#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) \ + _(KHR_composition_layer_equirect2, KHR_COMPOSITION_LAYER_EQUIRECT2) +#else +#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) +#endif + + /* * XR_EXT_debug_utils */ @@ -236,6 +249,7 @@ OXR_EXTENSION_SUPPORT_KHR_composition_layer_cube(_) \ OXR_EXTENSION_SUPPORT_KHR_composition_layer_cylinder(_) \ OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \ + OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) \ OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) \ OXR_EXTENSION_SUPPORT_MND_headless(_) \ OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \