Monado OpenXR Runtime
xrt_results.h
Go to the documentation of this file.
1 // Copyright 2020-2023, Collabora, Ltd.
2 // SPDX-License-Identifier: BSL-1.0
3 /*!
4  * @file
5  * @brief Internal result type for XRT.
6  * @author Christoph Haag <christoph.haag@collabora.com>
7  * @ingroup xrt_iface
8  */
9 
10 #pragma once
11 
12 /*!
13  * Result type used across Monado.
14  *
15  * 0 is @ref XRT_SUCCESS, positive values are "special" non-error return codes (like timeout), negative values are
16  * errors.
17  *
18  * @see u_pp_xrt_result
19  * @ingroup xrt_iface
20  */
21 typedef enum xrt_result
22 {
23  /*!
24  * The operation succeeded
25  */
27 
28  /*!
29  * The operation was given a timeout and timed out.
30  *
31  * The value 2 picked so it matches VK_TIMEOUT.
32  */
34 
35  /*!
36  * A problem occurred either with the IPC transport itself, with invalid commands from the client, or with
37  * invalid responses from the server.
38  */
40 
41  /*!
42  * Returned when trying to acquire or release an image and there is no image left to acquire/no space in the
43  * queue left to release to
44  */
46 
47  /*!
48  * Other unspecified error related to Vulkan
49  */
51 
52  /*!
53  * Other unspecified error related to OpenGL
54  */
56 
57  /*!
58  * The function tried to submit Vulkan commands but received an error.
59  */
61 
62  /*!
63  *
64  * Returned when a swapchain create flag is passed that is valid, but
65  * not supported by the main compositor (and lack of support is also
66  * valid).
67  *
68  * For use when e.g. the protected content image flag is requested but
69  * isn't supported.
70  */
72 
73  /*!
74  * Could not allocate native image buffer(s).
75  */
77 
78  /*!
79  * The pose is no longer active, this happens when the application
80  * tries to get a pose that is no longer active.
81  */
83 
84  /*!
85  * Creating a fence failed.
86  */
88 
89  /*!
90  * Getting or giving the native fence handle caused a error.
91  */
93 
94  /*!
95  * Multiple not supported on this layer level (IPC, compositor).
96  */
98 
99  /*!
100  * The requested format is not supported by Monado.
101  */
103 
104  /*!
105  * The given config was EGL_NO_CONFIG_KHR and EGL_KHR_no_config_context
106  * is not supported by the display.
107  */
109 
110  /*!
111  * Failed to initialize threading components.
112  */
114 
115  /*!
116  * The client has not created a session on this IPC connection,
117  * which is needed for the given command.
118  */
120 
121  /*!
122  * The client has already created a session on this IPC connection.
123  */
125  /*!
126  * The prober list has not been locked before this call.
127  */
129  /*!
130  * Creating the @ref xrt_prober failed.
131  */
133  /*!
134  * The prober list is locked (already).
135  */
137  /*!
138  * The prober list has not been locked before this call.
139  */
141  /*!
142  * The probring failed.
143  */
145  /*!
146  * Creating a @ref xrt_device failed.
147  */
149  /*!
150  * Some D3D error, from code shared between D3D11 and D3D12
151  */
153  /*!
154  * Some D3D11 error
155  */
157  /*!
158  * Some D3D12 error
159  */
161  /*!
162  * The @ref xrt_space_overseer doesn't support recentering driven from
163  * the application side of things.
164  */
166  /*!
167  * The system doesn't support compositor, this error can be returned
168  * when trying to create the system compositor or trying to create the
169  * native compositor.
170  */
172  /*!
173  * The client has not created a compositor on this IPC connection,
174  * which is needed for the given command.
175  */
177 
178  /*!
179  * The function called on the device was not implemented, it is not
180  * meant to query the availability of the function or feature, only a
181  * error condition on bad code.
182  */
enum xrt_result xrt_result_t
Result type used across Monado.
xrt_result
Result type used across Monado.
Definition: xrt_results.h:22
@ XRT_ERROR_EGL_CONFIG_MISSING
The given config was EGL_NO_CONFIG_KHR and EGL_KHR_no_config_context is not supported by the display.
Definition: xrt_results.h:108
@ XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED
The function called on the device was not implemented, it is not meant to query the availability of t...
Definition: xrt_results.h:183
@ XRT_ERROR_NATIVE_HANDLE_FENCE_ERROR
Getting or giving the native fence handle caused a error.
Definition: xrt_results.h:92
@ XRT_ERROR_IPC_SESSION_ALREADY_CREATED
The client has already created a session on this IPC connection.
Definition: xrt_results.h:124
@ XRT_ERROR_DEVICE_CREATION_FAILED
Creating a xrt_device failed.
Definition: xrt_results.h:148
@ XRT_ERROR_FENCE_CREATE_FAILED
Creating a fence failed.
Definition: xrt_results.h:87
@ XRT_ERROR_PROBING_FAILED
The probring failed.
Definition: xrt_results.h:144
@ XRT_ERROR_SWAPCHAIN_FLAG_VALID_BUT_UNSUPPORTED
Returned when a swapchain create flag is passed that is valid, but not supported by the main composit...
Definition: xrt_results.h:71
@ XRT_ERROR_OPENGL
Other unspecified error related to OpenGL.
Definition: xrt_results.h:55
@ XRT_ERROR_VULKAN
Other unspecified error related to Vulkan.
Definition: xrt_results.h:50
@ XRT_ERROR_IPC_COMPOSITOR_NOT_CREATED
The client has not created a compositor on this IPC connection, which is needed for the given command...
Definition: xrt_results.h:176
@ XRT_ERROR_FAILED_TO_SUBMIT_VULKAN_COMMANDS
The function tried to submit Vulkan commands but received an error.
Definition: xrt_results.h:60
@ XRT_ERROR_POSE_NOT_ACTIVE
The pose is no longer active, this happens when the application tries to get a pose that is no longer...
Definition: xrt_results.h:82
@ XRT_ERROR_COMPOSITOR_NOT_SUPPORTED
The system doesn't support compositor, this error can be returned when trying to create the system co...
Definition: xrt_results.h:171
@ XRT_ERROR_THREADING_INIT_FAILURE
Failed to initialize threading components.
Definition: xrt_results.h:113
@ XRT_ERROR_NO_IMAGE_AVAILABLE
Returned when trying to acquire or release an image and there is no image left to acquire/no space in...
Definition: xrt_results.h:45
@ XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED
Multiple not supported on this layer level (IPC, compositor).
Definition: xrt_results.h:97
@ XRT_ERROR_ALLOCATION
Could not allocate native image buffer(s).
Definition: xrt_results.h:76
@ XRT_ERROR_PROBER_NOT_SUPPORTED
The prober list has not been locked before this call.
Definition: xrt_results.h:128
@ XRT_ERROR_PROBER_LIST_LOCKED
The prober list is locked (already).
Definition: xrt_results.h:136
@ XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED
The requested format is not supported by Monado.
Definition: xrt_results.h:102
@ XRT_ERROR_D3D12
Some D3D12 error.
Definition: xrt_results.h:160
@ XRT_ERROR_IPC_SESSION_NOT_CREATED
The client has not created a session on this IPC connection, which is needed for the given command.
Definition: xrt_results.h:119
@ XRT_SUCCESS
The operation succeeded.
Definition: xrt_results.h:26
@ XRT_ERROR_PROBER_CREATION_FAILED
Creating the xrt_prober failed.
Definition: xrt_results.h:132
@ XRT_TIMEOUT
The operation was given a timeout and timed out.
Definition: xrt_results.h:33
@ XRT_ERROR_D3D
Some D3D error, from code shared between D3D11 and D3D12.
Definition: xrt_results.h:152
@ XRT_ERROR_IPC_FAILURE
A problem occurred either with the IPC transport itself, with invalid commands from the client,...
Definition: xrt_results.h:39
@ XRT_ERROR_D3D11
Some D3D11 error.
Definition: xrt_results.h:156
@ XRT_ERROR_RECENTERING_NOT_SUPPORTED
The xrt_space_overseer doesn't support recentering driven from the application side of things.
Definition: xrt_results.h:165
@ XRT_ERROR_PROBER_LIST_NOT_LOCKED
The prober list has not been locked before this call.
Definition: xrt_results.h:140