The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: return XR_SPACE_BOUNDS_UNAVAILABLE for unimplemented function

Fixes d7c1f7f13

Since d7c1f7f13 OXR_CHECK_XRET the return code
XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED or (XRT_ERROR_NOT_IMPLEMENTED)
was translated to returning an XR_RUNTIME_FAILURE to the app with the
OXR_CHECK_XRET macro.

That the function is not implemented on an xrt_device is an implementation
detail in monado that we don't need to pass along to the application, the
application only needs to know that bounds are not available.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2289>

+1 -1
+1 -1
src/xrt/state_trackers/oxr/oxr_space.c
··· 175 175 enum xrt_reference_space_type reference_space_type = xr_ref_space_to_xrt(referenceSpaceType); 176 176 177 177 xrt_result_t xret = xrt_comp_get_reference_bounds_rect(xc, reference_space_type, (struct xrt_vec2 *)bounds); 178 - if (xret == XRT_SPACE_BOUNDS_UNAVAILABLE) { 178 + if (xret == XRT_SPACE_BOUNDS_UNAVAILABLE || xret == XRT_ERROR_NOT_IMPLEMENTED) { 179 179 // `bounds` must be set to 0 on XR_SPACE_BOUNDS_UNAVAILABLE 180 180 *bounds = (XrExtent2Df){0}; 181 181 return XR_SPACE_BOUNDS_UNAVAILABLE;