st/oxr: Add extension support for XR_KHR_composition_layer_equirect2

This commit is contained in:
Jakob Bornecrantz 2020-10-05 16:38:43 +01:00
parent 708dc80bbc
commit 942ba178a0
4 changed files with 30 additions and 9 deletions

View file

@ -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}")

View file

@ -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'],

View file

@ -18,3 +18,5 @@
#cmakedefine XRT_FEATURE_OPENXR_LAYER_DEPTH
#cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT
#cmakedefine XRT_FEATURE_OPENXR_LAYER_EQUIRECT_LEGACY

View file

@ -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(_) \