st/oxr: Sort extension list

This commit is contained in:
Jakob Bornecrantz 2022-01-04 18:58:35 +00:00
parent 683dc4ea56
commit fe9191a708
2 changed files with 154 additions and 154 deletions

View file

@ -8,30 +8,30 @@ from pathlib import Path
# Each extension that we implement gets an entry in this tuple.
# Each entry should be a list of defines that are checked for an extension:
# the first one must be the name of the extension itself.
# Keep sorted.
# Keep sorted, KHR, EXT, Vendor, experimental (same order).
EXTENSIONS = (
['XR_KHR_android_create_instance', 'XR_USE_PLATFORM_ANDROID'],
['XR_KHR_loader_init', 'XR_USE_PLATFORM_ANDROID'],
['XR_KHR_loader_init_android', 'OXR_HAVE_KHR_loader_init', 'XR_USE_PLATFORM_ANDROID'],
['XR_KHR_convert_timespec_time', 'XR_USE_TIMESPEC'],
['XR_KHR_opengl_enable', 'XR_USE_GRAPHICS_API_OPENGL'],
['XR_KHR_opengl_es_enable', 'XR_USE_GRAPHICS_API_OPENGL_ES'],
['XR_KHR_vulkan_enable', 'XR_USE_GRAPHICS_API_VULKAN'],
['XR_KHR_vulkan_enable2', 'XR_USE_GRAPHICS_API_VULKAN'],
['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_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_EXT_debug_utils'],
['XR_MND_headless'],
['XR_MND_swapchain_usage_input_attachment_bit'],
['XR_KHR_convert_timespec_time', 'XR_USE_TIMESPEC'],
['XR_KHR_loader_init_android', 'OXR_HAVE_KHR_loader_init', 'XR_USE_PLATFORM_ANDROID'],
['XR_KHR_loader_init', 'XR_USE_PLATFORM_ANDROID'],
['XR_KHR_opengl_enable', 'XR_USE_GRAPHICS_API_OPENGL'],
['XR_KHR_opengl_es_enable', 'XR_USE_GRAPHICS_API_OPENGL_ES'],
['XR_KHR_swapchain_usage_input_attachment_bit'],
['XR_EXTX_overlay'],
['XR_MNDX_egl_enable', 'XR_USE_PLATFORM_EGL', 'XR_USE_GRAPHICS_API_OPENGL'],
['XR_MNDX_ball_on_a_stick_controller'],
['XR_KHR_vulkan_enable', 'XR_USE_GRAPHICS_API_VULKAN'],
['XR_KHR_vulkan_enable2', 'XR_USE_GRAPHICS_API_VULKAN'],
['XR_EXT_debug_utils'],
['XR_EXT_hand_tracking'],
['XR_FB_display_refresh_rate'],
['XR_MND_headless'],
['XR_MND_swapchain_usage_input_attachment_bit'],
['XR_EXTX_overlay'],
['XR_MNDX_ball_on_a_stick_controller'],
['XR_MNDX_egl_enable', 'XR_USE_PLATFORM_EGL', 'XR_USE_GRAPHICS_API_OPENGL'],
)
ROOT = Path(__file__).resolve().parent.parent

View file

@ -31,94 +31,6 @@
#endif
/*
* XR_KHR_loader_init
*/
#if defined(XR_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
#define OXR_HAVE_KHR_loader_init
#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_) _(KHR_loader_init, KHR_LOADER_INIT)
#else
#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_)
#endif
/*
* XR_KHR_loader_init_android
*/
#if defined(XR_KHR_loader_init_android) && defined(OXR_HAVE_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
#define OXR_HAVE_KHR_loader_init_android
#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) _(KHR_loader_init_android, KHR_LOADER_INIT_ANDROID)
#else
#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_)
#endif
/*
* XR_KHR_convert_timespec_time
*/
#if defined(XR_KHR_convert_timespec_time) && defined(XR_USE_TIMESPEC)
#define OXR_HAVE_KHR_convert_timespec_time
#define OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) _(KHR_convert_timespec_time, KHR_CONVERT_TIMESPEC_TIME)
#else
#define OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_)
#endif
/*
* XR_KHR_opengl_enable
*/
#if defined(XR_KHR_opengl_enable) && defined(XR_USE_GRAPHICS_API_OPENGL)
#define OXR_HAVE_KHR_opengl_enable
#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) _(KHR_opengl_enable, KHR_OPENGL_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_)
#endif
/*
* XR_KHR_opengl_es_enable
*/
#if defined(XR_KHR_opengl_es_enable) && defined(XR_USE_GRAPHICS_API_OPENGL_ES)
#define OXR_HAVE_KHR_opengl_es_enable
#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) _(KHR_opengl_es_enable, KHR_OPENGL_ES_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_)
#endif
/*
* XR_KHR_vulkan_enable
*/
#if defined(XR_KHR_vulkan_enable) && defined(XR_USE_GRAPHICS_API_VULKAN)
#define OXR_HAVE_KHR_vulkan_enable
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) _(KHR_vulkan_enable, KHR_VULKAN_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_)
#endif
/*
* XR_KHR_vulkan_enable2
*/
#if defined(XR_KHR_vulkan_enable2) && defined(XR_USE_GRAPHICS_API_VULKAN)
#define OXR_HAVE_KHR_vulkan_enable2
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) _(KHR_vulkan_enable2, KHR_VULKAN_ENABLE2)
#else
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_)
#endif
/*
* XR_KHR_composition_layer_depth
*/
#if defined(XR_KHR_composition_layer_depth) && defined(XRT_FEATURE_OPENXR_LAYER_DEPTH)
#define OXR_HAVE_KHR_composition_layer_depth
#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) _(KHR_composition_layer_depth, KHR_COMPOSITION_LAYER_DEPTH)
#else
#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_)
#endif
/*
* XR_KHR_composition_layer_cube
*/
@ -142,6 +54,17 @@
#endif
/*
* XR_KHR_composition_layer_depth
*/
#if defined(XR_KHR_composition_layer_depth) && defined(XRT_FEATURE_OPENXR_LAYER_DEPTH)
#define OXR_HAVE_KHR_composition_layer_depth
#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) _(KHR_composition_layer_depth, KHR_COMPOSITION_LAYER_DEPTH)
#else
#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_)
#endif
/*
* XR_KHR_composition_layer_equirect
*/
@ -166,6 +89,95 @@
#endif
/*
* XR_KHR_convert_timespec_time
*/
#if defined(XR_KHR_convert_timespec_time) && defined(XR_USE_TIMESPEC)
#define OXR_HAVE_KHR_convert_timespec_time
#define OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) _(KHR_convert_timespec_time, KHR_CONVERT_TIMESPEC_TIME)
#else
#define OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_)
#endif
/*
* XR_KHR_loader_init_android
*/
#if defined(XR_KHR_loader_init_android) && defined(OXR_HAVE_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
#define OXR_HAVE_KHR_loader_init_android
#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) _(KHR_loader_init_android, KHR_LOADER_INIT_ANDROID)
#else
#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_)
#endif
/*
* XR_KHR_loader_init
*/
#if defined(XR_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
#define OXR_HAVE_KHR_loader_init
#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_) _(KHR_loader_init, KHR_LOADER_INIT)
#else
#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_)
#endif
/*
* XR_KHR_opengl_enable
*/
#if defined(XR_KHR_opengl_enable) && defined(XR_USE_GRAPHICS_API_OPENGL)
#define OXR_HAVE_KHR_opengl_enable
#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) _(KHR_opengl_enable, KHR_OPENGL_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_)
#endif
/*
* XR_KHR_opengl_es_enable
*/
#if defined(XR_KHR_opengl_es_enable) && defined(XR_USE_GRAPHICS_API_OPENGL_ES)
#define OXR_HAVE_KHR_opengl_es_enable
#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) _(KHR_opengl_es_enable, KHR_OPENGL_ES_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_)
#endif
/*
* XR_KHR_swapchain_usage_input_attachment_bit
*/
#if defined(XR_KHR_swapchain_usage_input_attachment_bit)
#define OXR_HAVE_KHR_swapchain_usage_input_attachment_bit
#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
_(KHR_swapchain_usage_input_attachment_bit, KHR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
#else
#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_)
#endif
/*
* XR_KHR_vulkan_enable
*/
#if defined(XR_KHR_vulkan_enable) && defined(XR_USE_GRAPHICS_API_VULKAN)
#define OXR_HAVE_KHR_vulkan_enable
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) _(KHR_vulkan_enable, KHR_VULKAN_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_)
#endif
/*
* XR_KHR_vulkan_enable2
*/
#if defined(XR_KHR_vulkan_enable2) && defined(XR_USE_GRAPHICS_API_VULKAN)
#define OXR_HAVE_KHR_vulkan_enable2
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) _(KHR_vulkan_enable2, KHR_VULKAN_ENABLE2)
#else
#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_)
#endif
/*
* XR_EXT_debug_utils
*/
@ -177,6 +189,28 @@
#endif
/*
* XR_EXT_hand_tracking
*/
#if defined(XR_EXT_hand_tracking)
#define OXR_HAVE_EXT_hand_tracking
#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) _(EXT_hand_tracking, EXT_HAND_TRACKING)
#else
#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_)
#endif
/*
* XR_FB_display_refresh_rate
*/
#if defined(XR_FB_display_refresh_rate)
#define OXR_HAVE_FB_display_refresh_rate
#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) _(FB_display_refresh_rate, FB_DISPLAY_REFRESH_RATE)
#else
#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_)
#endif
/*
* XR_MND_headless
*/
@ -200,18 +234,6 @@
#endif
/*
* XR_KHR_swapchain_usage_input_attachment_bit
*/
#if defined(XR_KHR_swapchain_usage_input_attachment_bit)
#define OXR_HAVE_KHR_swapchain_usage_input_attachment_bit
#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
_(KHR_swapchain_usage_input_attachment_bit, KHR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
#else
#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_)
#endif
/*
* XR_EXTX_overlay
*/
@ -223,17 +245,6 @@
#endif
/*
* XR_MNDX_egl_enable
*/
#if defined(XR_MNDX_egl_enable) && defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL)
#define OXR_HAVE_MNDX_egl_enable
#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) _(MNDX_egl_enable, MNDX_EGL_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
#endif
/*
* XR_MNDX_ball_on_a_stick_controller
*/
@ -247,24 +258,13 @@
/*
* XR_EXT_hand_tracking
* XR_MNDX_egl_enable
*/
#if defined(XR_EXT_hand_tracking)
#define OXR_HAVE_EXT_hand_tracking
#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) _(EXT_hand_tracking, EXT_HAND_TRACKING)
#if defined(XR_MNDX_egl_enable) && defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL)
#define OXR_HAVE_MNDX_egl_enable
#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) _(MNDX_egl_enable, MNDX_EGL_ENABLE)
#else
#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_)
#endif
/*
* XR_FB_display_refresh_rate
*/
#if defined(XR_FB_display_refresh_rate)
#define OXR_HAVE_FB_display_refresh_rate
#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) _(FB_display_refresh_rate, FB_DISPLAY_REFRESH_RATE)
#else
#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_)
#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
#endif
// end of GENERATED per-extension defines - do not modify - used by scripts
@ -292,25 +292,25 @@
// clang-format off
#define OXR_EXTENSION_SUPPORT_GENERATE(_) \
OXR_EXTENSION_SUPPORT_KHR_android_create_instance(_) \
OXR_EXTENSION_SUPPORT_KHR_loader_init(_) \
OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) \
OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) \
OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) \
OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) \
OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) \
OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) \
OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) \
OXR_EXTENSION_SUPPORT_KHR_composition_layer_cube(_) \
OXR_EXTENSION_SUPPORT_KHR_composition_layer_cylinder(_) \
OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) \
OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \
OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) \
OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) \
OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) \
OXR_EXTENSION_SUPPORT_KHR_loader_init(_) \
OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) \
OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) \
OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) \
OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) \
OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) \
OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) \
OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) \
OXR_EXTENSION_SUPPORT_MND_headless(_) \
OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \
OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \
OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) \
OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_)
OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
// clang-format on