diff --git a/scripts/generate_oxr_ext_support.py b/scripts/generate_oxr_ext_support.py index 8381ffe58..d8707a7b8 100755 --- a/scripts/generate_oxr_ext_support.py +++ b/scripts/generate_oxr_ext_support.py @@ -24,7 +24,7 @@ EXTENSIONS = ( ['XR_KHR_swapchain_usage_input_attachment_bit'], ['XR_KHR_vulkan_enable', 'XR_USE_GRAPHICS_API_VULKAN'], ['XR_KHR_vulkan_enable2', 'XR_USE_GRAPHICS_API_VULKAN'], - ['XR_EXT_debug_utils'], + ['XR_EXT_debug_utils', 'XRT_FEATURE_OPENXR_DEBUG_UTILS'], ['XR_EXT_hand_tracking'], ['XR_FB_display_refresh_rate'], ['XR_MND_headless'], 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 e8ad03d3e..172ab3627 100644 --- a/src/xrt/include/xrt/xrt_config_build.h.cmake_in +++ b/src/xrt/include/xrt/xrt_config_build.h.cmake_in @@ -15,6 +15,7 @@ #cmakedefine XRT_FEATURE_COMPOSITOR_MAIN #cmakedefine XRT_FEATURE_IPC #cmakedefine XRT_FEATURE_OPENXR +#cmakedefine XRT_FEATURE_OPENXR_DEBUG_UTILS #cmakedefine XRT_FEATURE_OPENXR_LAYER_CUBE #cmakedefine XRT_FEATURE_OPENXR_LAYER_CYLINDER #cmakedefine XRT_FEATURE_OPENXR_LAYER_DEPTH diff --git a/src/xrt/state_trackers/oxr/oxr_api_negotiate.c b/src/xrt/state_trackers/oxr/oxr_api_negotiate.c index 9532b1f20..b18663e0c 100644 --- a/src/xrt/state_trackers/oxr/oxr_api_negotiate.c +++ b/src/xrt/state_trackers/oxr/oxr_api_negotiate.c @@ -233,7 +233,6 @@ handle_non_null(struct oxr_instance *inst, struct oxr_logger *log, const char *n ENTRY_IF_EXT(xrRequestDisplayRefreshRateFB, FB_display_refresh_rate); #endif -#if 0 #ifdef OXR_HAVE_EXT_debug_utils ENTRY_IF_EXT(xrSetDebugUtilsObjectNameEXT, EXT_debug_utils); ENTRY_IF_EXT(xrCreateDebugUtilsMessengerEXT, EXT_debug_utils); @@ -243,7 +242,6 @@ handle_non_null(struct oxr_instance *inst, struct oxr_logger *log, const char *n ENTRY_IF_EXT(xrSessionEndDebugUtilsLabelRegionEXT, EXT_debug_utils); ENTRY_IF_EXT(xrSessionInsertDebugUtilsLabelEXT, EXT_debug_utils); #endif // OXR_HAVE_EXT_debug_utils -#endif #ifdef OXR_HAVE_KHR_opengl_enable ENTRY_IF_EXT(xrGetOpenGLGraphicsRequirementsKHR, KHR_opengl_enable); diff --git a/src/xrt/state_trackers/oxr/oxr_extension_support.h b/src/xrt/state_trackers/oxr/oxr_extension_support.h index 29071515f..369be28f8 100644 --- a/src/xrt/state_trackers/oxr/oxr_extension_support.h +++ b/src/xrt/state_trackers/oxr/oxr_extension_support.h @@ -181,7 +181,7 @@ /* * XR_EXT_debug_utils */ -#if defined(XR_EXT_debug_utils) +#if defined(XR_EXT_debug_utils) && defined(XRT_FEATURE_OPENXR_DEBUG_UTILS) #define OXR_HAVE_EXT_debug_utils #define OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) _(EXT_debug_utils, EXT_DEBUG_UTILS) #else