diff --git a/scripts/generate_oxr_ext_support.py b/scripts/generate_oxr_ext_support.py index f31a67a1d..14ec3ce05 100755 --- a/scripts/generate_oxr_ext_support.py +++ b/scripts/generate_oxr_ext_support.py @@ -11,6 +11,8 @@ from pathlib import Path # Keep sorted. 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'], diff --git a/src/xrt/state_trackers/oxr/oxr_extension_support.h b/src/xrt/state_trackers/oxr/oxr_extension_support.h index f6f85d8c9..3833f4a2d 100644 --- a/src/xrt/state_trackers/oxr/oxr_extension_support.h +++ b/src/xrt/state_trackers/oxr/oxr_extension_support.h @@ -31,6 +31,28 @@ #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 */ @@ -247,6 +269,8 @@ // 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(_) \