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 * A problem occurred either with the IPC transport itself, with invalid commands from the client, or with
43 * invalid responses from the server.
44 */
46
47 /*!
48 * Returned when trying to acquire or release an image and there is no image left to acquire/no space in the
49 * queue left to release to
50 */
52
53 /*!
54 * Other unspecified error related to Vulkan
55 */
57
58 /*!
59 * Other unspecified error related to OpenGL
60 */
62
63 /*!
64 * The function tried to submit Vulkan commands but received an error.
65 */
67
68 /*!
69 *
70 * Returned when a swapchain create flag is passed that is valid, but
71 * not supported by the main compositor (and lack of support is also
72 * valid).
73 *
74 * For use when e.g. the protected content image flag is requested but
75 * isn't supported.
76 */
78
79 /*!
80 * Could not allocate native image buffer(s).
81 */
83
84 /*!
85 * The pose is no longer active, this happens when the application
86 * tries to get a pose that is no longer active.
87 */
89
90 /*!
91 * Creating a fence failed.
92 */
94
95 /*!
96 * Getting or giving the native fence handle caused a error.
97 */
99
100 /*!
101 * Multiple not supported on this layer level (IPC, compositor).
102 */
104
105 /*!
106 * The requested format is not supported by Monado.
107 */
109
110 /*!
111 * The given config was EGL_NO_CONFIG_KHR and EGL_KHR_no_config_context
112 * is not supported by the display.
113 */
115
116 /*!
117 * Failed to initialize threading components.
118 */
120
121 /*!
122 * The client has not created a session on this IPC connection,
123 * which is needed for the given command.
124 */
126
127 /*!
128 * The client has already created a session on this IPC connection.
129 */
131 /*!
132 * The prober list has not been locked before this call.
133 */
135 /*!
136 * Creating the @ref xrt_prober failed.
137 */
139 /*!
140 * The prober list is locked (already).
141 */
143 /*!
144 * The prober list has not been locked before this call.
145 */
147 /*!
148 * The probring failed.
149 */
151 /*!
152 * Creating a @ref xrt_device failed.
153 */
155 /*!
156 * Some D3D error, from code shared between D3D11 and D3D12
157 */
159 /*!
160 * Some D3D11 error
161 */
163 /*!
164 * Some D3D12 error
165 */
167 /*!
168 * The @ref xrt_space_overseer doesn't support recentering driven from
169 * the application side of things.
170 */
172 /*!
173 * The system doesn't support compositor, this error can be returned
174 * when trying to create the system compositor or trying to create the
175 * native compositor.
176 */
178 /*!
179 * The client has not created a compositor on this IPC connection,
180 * which is needed for the given command.
181 */
183
184 /*!
185 * The interface function called is not implemented by its interface.
186 */
188
189 /*!
190 * The supplied space type is not supported for this operation.
191 */
193
194 /*!
195 * Some other Android error, typically a logic error that should be impossible to reach.
196 */
198
199 /*!
200 * Returned when a feature is not supported by the device.
201 */
203
204 /*!
205 * The input provided is a valid value from the enum xrt_input_name but is not supported by the driver.
206 */
208
209 /*!
210 * The output provided is a valid value from the enum xrt_output_name but is not supported by the driver.
211 */
213
214 /*!
215 * The requested operation failed, verify the log to know more.
216 */
218
219 /*!
220 * Failed to create a sync primitive like mutex.
221 */
223
224 /*!
225 * The IPC server detected that a service was already running and
226 * couldn't start because of that.
227 */
229
230 /*!
231 * The IPC server couldn't starts it mainloop.
232 */
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:114
@ 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:212
@ 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:207
@ XRT_ERROR_NATIVE_HANDLE_FENCE_ERROR
Getting or giving the native fence handle caused a error.
Definition: xrt_results.h:98
@ XRT_ERROR_IPC_SESSION_ALREADY_CREATED
The client has already created a session on this IPC connection.
Definition: xrt_results.h:130
@ XRT_ERROR_DEVICE_CREATION_FAILED
Creating a xrt_device failed.
Definition: xrt_results.h:154
@ XRT_ERROR_FENCE_CREATE_FAILED
Creating a fence failed.
Definition: xrt_results.h:93
@ XRT_ERROR_PROBING_FAILED
The probring failed.
Definition: xrt_results.h:150
@ 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:77
@ XRT_ERROR_UNSUPPORTED_SPACE_TYPE
The supplied space type is not supported for this operation.
Definition: xrt_results.h:192
@ XRT_ERROR_OPENGL
Other unspecified error related to OpenGL.
Definition: xrt_results.h:61
@ XRT_ERROR_IPC_MAINLOOP_FAILED_TO_INIT
The IPC server couldn't starts it mainloop.
Definition: xrt_results.h:233
@ XRT_ERROR_VULKAN
Other unspecified error related to Vulkan.
Definition: xrt_results.h:56
@ 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:182
@ XRT_ERROR_FAILED_TO_SUBMIT_VULKAN_COMMANDS
The function tried to submit Vulkan commands but received an error.
Definition: xrt_results.h:66
@ 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:88
@ 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:177
@ XRT_ERROR_THREADING_INIT_FAILURE
Failed to initialize threading components.
Definition: xrt_results.h:119
@ 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:51
@ XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED
Multiple not supported on this layer level (IPC, compositor).
Definition: xrt_results.h:103
@ XRT_ERROR_SYNC_PRIMITIVE_CREATION_FAILED
Failed to create a sync primitive like mutex.
Definition: xrt_results.h:222
@ XRT_ERROR_ALLOCATION
Could not allocate native image buffer(s).
Definition: xrt_results.h:82
@ 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:228
@ XRT_ERROR_PROBER_NOT_SUPPORTED
The prober list has not been locked before this call.
Definition: xrt_results.h:134
@ XRT_ERROR_ANDROID
Some other Android error, typically a logic error that should be impossible to reach.
Definition: xrt_results.h:197
@ XRT_ERROR_PROBER_LIST_LOCKED
The prober list is locked (already).
Definition: xrt_results.h:142
@ XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED
The requested format is not supported by Monado.
Definition: xrt_results.h:108
@ XRT_ERROR_D3D12
Some D3D12 error.
Definition: xrt_results.h:166
@ 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:125
@ XRT_SUCCESS
The operation succeeded.
Definition: xrt_results.h:27
@ XRT_ERROR_OUTPUT_REQUEST_FAILURE
The requested operation failed, verify the log to know more.
Definition: xrt_results.h:217
@ XRT_ERROR_PROBER_CREATION_FAILED
Creating the xrt_prober failed.
Definition: xrt_results.h:138
@ 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:158
@ XRT_ERROR_NOT_IMPLEMENTED
The interface function called is not implemented by its interface.
Definition: xrt_results.h:187
@ XRT_ERROR_IPC_FAILURE
A problem occurred either with the IPC transport itself, with invalid commands from the client,...
Definition: xrt_results.h:45
@ XRT_ERROR_D3D11
Some D3D11 error.
Definition: xrt_results.h:162
@ XRT_ERROR_RECENTERING_NOT_SUPPORTED
The xrt_space_overseer doesn't support recentering driven from the application side of things.
Definition: xrt_results.h:171
@ XRT_ERROR_PROBER_LIST_NOT_LOCKED
The prober list has not been locked before this call.
Definition: xrt_results.h:146
@ XRT_ERROR_FEATURE_NOT_SUPPORTED
Returned when a feature is not supported by the device.
Definition: xrt_results.h:202