mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-14 17:50:06 +00:00
st/oxr: Properly guard misc extensions with ifdefs
This commit is contained in:
parent
60df8b60ba
commit
179c10c399
src/xrt/state_trackers/oxr
|
@ -257,7 +257,7 @@ oxr_xrLocateViews(XrSession session,
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef XR_KHR_visibility_mask
|
||||
#ifdef OXR_HAVE_KHR_visibility_mask
|
||||
XRAPI_ATTR XrResult XRAPI_CALL
|
||||
oxr_xrGetVisibilityMaskKHR(XrSession session,
|
||||
XrViewConfigurationType viewConfigurationType,
|
||||
|
|
|
@ -928,12 +928,14 @@ oxr_session_create_impl(struct oxr_logger *log,
|
|||
* function added.
|
||||
*/
|
||||
|
||||
#ifdef OXR_HAVE_MND_headless
|
||||
if (sys->inst->extensions.MND_headless) {
|
||||
OXR_SESSION_ALLOCATE_AND_INIT(log, sys, *out_session);
|
||||
(*out_session)->compositor = NULL;
|
||||
(*out_session)->create_swapchain = NULL;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
|
||||
"(createInfo->next->type) doesn't contain a valid "
|
||||
"graphics binding structs");
|
||||
|
|
|
@ -318,6 +318,7 @@ oxr_system_get_properties(struct oxr_logger *log, struct oxr_system *sys, XrSyst
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef OXR_HAVE_MNDX_force_feedback_curl
|
||||
XrSystemForceFeedbackCurlPropertiesMNDX *force_feedback_props = NULL;
|
||||
if (sys->inst->extensions.MNDX_force_feedback_curl) {
|
||||
force_feedback_props =
|
||||
|
@ -328,6 +329,7 @@ oxr_system_get_properties(struct oxr_logger *log, struct oxr_system *sys, XrSyst
|
|||
if (force_feedback_props) {
|
||||
force_feedback_props->supportsForceFeedbackCurl = oxr_system_get_force_feedback_support(log, sys->inst);
|
||||
}
|
||||
#endif
|
||||
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -539,9 +539,11 @@ oxr_verify_XrSessionCreateInfo(struct oxr_logger *log,
|
|||
/* We didn't recognize any graphics binding structs in the chain - our
|
||||
* last hope is headless. */
|
||||
|
||||
#ifdef OXR_HAVE_MND_headless
|
||||
if (inst->extensions.MND_headless) {
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
#endif // OXR_HAVE_MND_headless
|
||||
|
||||
return oxr_error(log, XR_ERROR_GRAPHICS_DEVICE_INVALID,
|
||||
"(createInfo->next) Argument chain does not contain "
|
||||
|
|
Loading…
Reference in a new issue