mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-15 11:25:26 +00:00
xrt: introduce XRT_ERROR_NOT_IMPLEMENTED
Merge XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED and XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED into a single generic result value. Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2244>
This commit is contained in:
parent
d7c1f7f138
commit
34d82ea082
1
doc/changes/xrt/mr.2244.md
Normal file
1
doc/changes/xrt/mr.2244.md
Normal file
|
@ -0,0 +1 @@
|
|||
introduce XRT_ERROR_NOT_IMPLEMENTED, remove XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED and XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED
|
|
@ -530,7 +530,7 @@ u_device_ni_get_visibility_mask(struct xrt_device *xdev,
|
|||
struct xrt_visibility_mask **out_mask)
|
||||
{
|
||||
E(get_visibility_mask);
|
||||
return XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED;
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -168,8 +168,7 @@ u_pp_xrt_result(struct u_pp_delegate dg, xrt_result_t xret)
|
|||
case XRT_ERROR_RECENTERING_NOT_SUPPORTED: DG("XRT_ERROR_RECENTERING_NOT_SUPPORTED"); return;
|
||||
case XRT_ERROR_COMPOSITOR_NOT_SUPPORTED: DG("XRT_ERROR_COMPOSITOR_NOT_SUPPORTED"); return;
|
||||
case XRT_ERROR_IPC_COMPOSITOR_NOT_CREATED: DG("XRT_ERROR_IPC_COMPOSITOR_NOT_CREATED"); return;
|
||||
case XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED: DG("XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED"); return;
|
||||
case XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED: DG("XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED"); return;
|
||||
case XRT_ERROR_NOT_IMPLEMENTED: DG("XRT_ERROR_NOT_IMPLEMENTED"); return;
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
|
|
|
@ -1889,9 +1889,7 @@ xrt_comp_get_reference_bounds_rect(struct xrt_compositor *xc,
|
|||
struct xrt_vec2 *bounds)
|
||||
{
|
||||
if (xc->get_reference_bounds_rect == NULL) {
|
||||
bounds->x = 0.f;
|
||||
bounds->y = 0.f;
|
||||
return XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED;
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
return xc->get_reference_bounds_rect(xc, reference_space_type, bounds);
|
||||
|
|
|
@ -584,7 +584,7 @@ xrt_device_get_body_skeleton(struct xrt_device *xdev,
|
|||
struct xrt_body_skeleton *out_value)
|
||||
{
|
||||
if (xdev->get_body_skeleton == NULL) {
|
||||
return XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED;
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
return xdev->get_body_skeleton(xdev, body_tracking_type, out_value);
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ xrt_device_get_body_joints(struct xrt_device *xdev,
|
|||
struct xrt_body_joint_set *out_value)
|
||||
{
|
||||
if (xdev->get_body_joints == NULL) {
|
||||
return XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED;
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
return xdev->get_body_joints(xdev, body_tracking_type, desired_timestamp_ns, out_value);
|
||||
}
|
||||
|
@ -667,9 +667,8 @@ xrt_device_get_visibility_mask(struct xrt_device *xdev,
|
|||
uint32_t view_index,
|
||||
struct xrt_visibility_mask **out_mask)
|
||||
{
|
||||
|
||||
if (xdev->get_visibility_mask == NULL) {
|
||||
return XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED;
|
||||
return XRT_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
return xdev->get_visibility_mask(xdev, type, view_index, out_mask);
|
||||
}
|
||||
|
|
|
@ -181,14 +181,7 @@ typedef enum xrt_result
|
|||
XRT_ERROR_IPC_COMPOSITOR_NOT_CREATED = -28,
|
||||
|
||||
/*!
|
||||
* The function called on the device was not implemented, it is not
|
||||
* meant to query the availability of the function or feature, only a
|
||||
* error condition on bad code.
|
||||
* The interface function called is not implemented by its interface.
|
||||
*/
|
||||
XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED = -29,
|
||||
|
||||
/*!
|
||||
* The function was not implemented in the compositor
|
||||
*/
|
||||
XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED = -30,
|
||||
XRT_ERROR_NOT_IMPLEMENTED = -29,
|
||||
} xrt_result_t;
|
||||
|
|
|
@ -1419,7 +1419,7 @@ oxr_session_get_visibility_mask(struct oxr_logger *log,
|
|||
// If we didn't have any cached mask get it.
|
||||
if (mask == NULL) {
|
||||
xret = xrt_device_get_visibility_mask(xdev, type, viewIndex, &mask);
|
||||
if (xret == XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED && xdev->hmd != NULL) {
|
||||
if (xret == XRT_ERROR_NOT_IMPLEMENTED && xdev->hmd != NULL) {
|
||||
const struct xrt_fov fov = xdev->hmd->distortion.fov[viewIndex];
|
||||
u_visibility_mask_get_default(type, &fov, &mask);
|
||||
xret = XRT_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue