Monado OpenXR Runtime
xrt_results.h
Go to the documentation of this file.
1// Copyright 2020-2023, Collabora, Ltd.
2// Copyright 2024-2025, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Internal result type for XRT.
7 * @author Christoph Haag <christoph.haag@collabora.com>
8 * @ingroup xrt_iface
9 */
10
11#pragma once
12
13/*!
14 * Result type used across Monado.
15 *
16 * 0 is @ref XRT_SUCCESS, positive values are "special" non-error return codes (like timeout), negative values are
17 * errors.
18 *
19 * @see u_pp_xrt_result
20 * @ingroup xrt_iface
21 */
22typedef enum xrt_result
23{
24 /*!
25 * The operation succeeded
26 */
28
29 /*!
30 * The operation was given a timeout and timed out.
31 *
32 * The value 2 picked so it matches VK_TIMEOUT.
33 */
35
36 /*!
37 * The space’s bounds are not known at the moment.
38 */
40
41 /*!
42 * An (asynchronous) operation has been cancelled.
43 */
45
46 /*!
47 * A problem occurred either with the IPC transport itself, with invalid commands from the client, or with
48 * invalid responses from the server.
49 */
51
52 /*!
53 * Returned when trying to acquire or release an image and there is no image left to acquire/no space in the
54 * queue left to release to
55 */
57
58 /*!
59 * Other unspecified error related to Vulkan
60 */
62
63 /*!
64 * Other unspecified error related to OpenGL
65 */
67
68 /*!
69 * The function tried to submit Vulkan commands but received an error.
70 */
72
73 /*!
74 *
75 * Returned when a swapchain create flag is passed that is valid, but
76 * not supported by the main compositor (and lack of support is also
77 * valid).
78 *
79 * For use when e.g. the protected content image flag is requested but
80 * isn't supported.
81 */
83
84 /*!
85 * Could not allocate native image buffer(s).
86 */
88
89 /*!
90 * The pose is no longer active, this happens when the application
91 * tries to get a pose that is no longer active.
92 */
94
95 /*!
96 * Creating a fence failed.
97 */
99
100 /*!
101 * Getting or giving the native fence handle caused a error.
102 */
104
105 /*!
106 * Multiple not supported on this layer level (IPC, compositor).
107 */
109
110 /*!
111 * The requested format is not supported by Monado.
112 */
114
115 /*!
116 * The given config was EGL_NO_CONFIG_KHR and EGL_KHR_no_config_context
117 * is not supported by the display.
118 */
120
121 /*!
122 * Failed to initialize threading components.
123 */
125
126 /*!
127 * The client has not created a session on this IPC connection,
128 * which is needed for the given command.
129 */
131
132 /*!
133 * The client has already created a session on this IPC connection.
134 */
136 /*!
137 * The prober list has not been locked before this call.
138 */
140 /*!
141 * Creating the @ref xrt_prober failed.
142 */
144 /*!
145 * The prober list is locked (already).
146 */
148 /*!
149 * The prober list has not been locked before this call.
150 */
152 /*!
153 * The probring failed.
154 */
156 /*!
157 * Creating a @ref xrt_device failed.
158 */
160 /*!
161 * Some D3D error, from code shared between D3D11 and D3D12
162 */
164 /*!
165 * Some D3D11 error
166 */
168 /*!
169 * Some D3D12 error
170 */
172 /*!
173 * The @ref xrt_space_overseer doesn't support recentering driven from
174 * the application side of things.
175 */
177 /*!
178 * The system doesn't support compositor, this error can be returned
179 * when trying to create the system compositor or trying to create the
180 * native compositor.
181 */
183 /*!
184 * The client has not created a compositor on this IPC connection,
185 * which is needed for the given command.
186 */
188
189 /*!
190 * The interface function called is not implemented by its interface.
191 */
193
194 /*!
195 * The supplied space type is not supported for this operation.
196 */
198
199 /*!
200 * Some other Android error, typically a logic error that should be impossible to reach.
201 */
203
204 /*!
205 * Returned when a feature is not supported by the device.
206 */
208
209 /*!
210 * The input provided is a valid value from the enum xrt_input_name but is not supported by the driver.
211 */
213
214 /*!
215 * The output provided is a valid value from the enum xrt_output_name but is not supported by the driver.
216 */
218
219 /*!
220 * The requested operation failed, verify the log to know more.
221 */
223
224 /*!
225 * Failed to create a sync primitive like mutex.
226 */
228
229 /*!
230 * The IPC server detected that a service was already running and
231 * couldn't start because of that.
232 */
234
235 /*!
236 * The IPC server couldn't starts it mainloop.
237 */
239
240 /*!
241 * Invalid function arguments passed in, e.g. null or out-of-range values.
242 */
244
245 /*!
246 * Querying result of a future before it is ready.
247 */
249
250 /*!
251 * Invoking complete on an already completed future
252 */
enum xrt_result xrt_result_t
Result type used across Monado.
xrt_result
Result type used across Monado.
Definition: xrt_results.h:23
@ 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:119
@ XRT_ERROR_OUTPUT_UNSUPPORTED
The output provided is a valid value from the enum xrt_output_name but is not supported by the driver...
Definition: xrt_results.h:217
@ XRT_ERROR_INPUT_UNSUPPORTED
The input provided is a valid value from the enum xrt_input_name but is not supported by the driver.
Definition: xrt_results.h:212
@ XRT_ERROR_NATIVE_HANDLE_FENCE_ERROR
Getting or giving the native fence handle caused a error.
Definition: xrt_results.h:103
@ XRT_ERROR_IPC_SESSION_ALREADY_CREATED
The client has already created a session on this IPC connection.
Definition: xrt_results.h:135
@ XRT_ERROR_DEVICE_CREATION_FAILED
Creating a xrt_device failed.
Definition: xrt_results.h:159
@ XRT_ERROR_FENCE_CREATE_FAILED
Creating a fence failed.
Definition: xrt_results.h:98
@ XRT_ERROR_PROBING_FAILED
The probring failed.
Definition: xrt_results.h:155
@ 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:82
@ XRT_ERROR_UNSUPPORTED_SPACE_TYPE
The supplied space type is not supported for this operation.
Definition: xrt_results.h:197
@ XRT_ERROR_OPENGL
Other unspecified error related to OpenGL.
Definition: xrt_results.h:66
@ XRT_ERROR_IPC_MAINLOOP_FAILED_TO_INIT
The IPC server couldn't starts it mainloop.
Definition: xrt_results.h:238
@ XRT_ERROR_VULKAN
Other unspecified error related to Vulkan.
Definition: xrt_results.h:61
@ 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:187
@ XRT_ERROR_FAILED_TO_SUBMIT_VULKAN_COMMANDS
The function tried to submit Vulkan commands but received an error.
Definition: xrt_results.h:71
@ 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:93
@ 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:182
@ XRT_ERROR_THREADING_INIT_FAILURE
Failed to initialize threading components.
Definition: xrt_results.h:124
@ 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:56
@ XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED
Multiple not supported on this layer level (IPC, compositor).
Definition: xrt_results.h:108
@ XRT_ERROR_SYNC_PRIMITIVE_CREATION_FAILED
Failed to create a sync primitive like mutex.
Definition: xrt_results.h:227
@ XRT_ERROR_ALLOCATION
Could not allocate native image buffer(s).
Definition: xrt_results.h:87
@ XRT_SPACE_BOUNDS_UNAVAILABLE
The space’s bounds are not known at the moment.
Definition: xrt_results.h:39
@ XRT_ERROR_IPC_SERVICE_ALREADY_RUNNING
The IPC server detected that a service was already running and couldn't start because of that.
Definition: xrt_results.h:233
@ XRT_ERROR_PROBER_NOT_SUPPORTED
The prober list has not been locked before this call.
Definition: xrt_results.h:139
@ XRT_OPERATION_CANCELLED
An (asynchronous) operation has been cancelled.
Definition: xrt_results.h:44
@ XRT_ERROR_ANDROID
Some other Android error, typically a logic error that should be impossible to reach.
Definition: xrt_results.h:202
@ XRT_ERROR_PROBER_LIST_LOCKED
The prober list is locked (already).
Definition: xrt_results.h:147
@ XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED
The requested format is not supported by Monado.
Definition: xrt_results.h:113
@ XRT_ERROR_D3D12
Some D3D12 error.
Definition: xrt_results.h:171
@ 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:130
@ XRT_SUCCESS
The operation succeeded.
Definition: xrt_results.h:27
@ XRT_ERROR_FUTURE_RESULT_NOT_READY
Querying result of a future before it is ready.
Definition: xrt_results.h:248
@ XRT_ERROR_OUTPUT_REQUEST_FAILURE
The requested operation failed, verify the log to know more.
Definition: xrt_results.h:222
@ XRT_ERROR_INVALID_ARGUMENT
Invalid function arguments passed in, e.g.
Definition: xrt_results.h:243
@ XRT_ERROR_PROBER_CREATION_FAILED
Creating the xrt_prober failed.
Definition: xrt_results.h:143
@ XRT_TIMEOUT
The operation was given a timeout and timed out.
Definition: xrt_results.h:34
@ XRT_ERROR_D3D
Some D3D error, from code shared between D3D11 and D3D12.
Definition: xrt_results.h:163
@ XRT_ERROR_NOT_IMPLEMENTED
The interface function called is not implemented by its interface.
Definition: xrt_results.h:192
@ XRT_ERROR_FUTURE_ALREADY_COMPLETE
Invoking complete on an already completed future.
Definition: xrt_results.h:253
@ XRT_ERROR_IPC_FAILURE
A problem occurred either with the IPC transport itself, with invalid commands from the client,...
Definition: xrt_results.h:50
@ XRT_ERROR_D3D11
Some D3D11 error.
Definition: xrt_results.h:167
@ XRT_ERROR_RECENTERING_NOT_SUPPORTED
The xrt_space_overseer doesn't support recentering driven from the application side of things.
Definition: xrt_results.h:176
@ XRT_ERROR_PROBER_LIST_NOT_LOCKED
The prober list has not been locked before this call.
Definition: xrt_results.h:151
@ XRT_ERROR_FEATURE_NOT_SUPPORTED
Returned when a feature is not supported by the device.
Definition: xrt_results.h:207