xrt_results.h 1.81 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2020, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
 * @file
 * @brief  Internal result type for XRT.
 * @author Christoph Haag <christoph.haag@collabora.com>
 * @ingroup xrt_iface
 */

#pragma once

typedef enum xrt_result
{
	XRT_SUCCESS = 0,
	XRT_ERROR_IPC_FAILURE = -1,
16
	XRT_ERROR_NO_IMAGE_AVAILABLE = -2,
17
18
19
	XRT_ERROR_VULKAN = -3,
	XRT_ERROR_OPENGL = -4,
	XRT_ERROR_FAILED_TO_SUBMIT_VULKAN_COMMANDS = -5,
20
21
22
23
24
25
26
27
28
29
	/*!
	 *
	 * Returned when a swapchain create flag is passed that is valid, but
	 * not supported by the main compositor (and lack of support is also
	 * valid).
	 *
	 * For use when e.g. the protected content image flag is requested but
	 * isn't supported.
	 */
	XRT_ERROR_SWAPCHAIN_FLAG_VALID_BUT_UNSUPPORTED = -6,
30
31
32
33
	/*!
	 * Could not allocate native image buffer(s).
	 */
	XRT_ERROR_ALLOCATION = -7,
34
	/*!
35
36
37
38
	 * The pose is no longer active, this happens when the application
	 * tries to access a pose that is no longer active.
	 */
	XRT_ERROR_POSE_NOT_ACTIVE = -8,
39
40
41
42
43
44
45
46
	/*!
	 * Creating a fence failed.
	 */
	XRT_ERROR_FENCE_CREATE_FAILED = -9,
	/*!
	 * Getting or giving the native fence handle caused a error.
	 */
	XRT_ERROR_NATIVE_HANDLE_FENCE_ERROR = -10,
47
48
49
50
	/*!
	 * Multiple not supported on this layer level (IPC, compositor).
	 */
	XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED = -11,
51
52
53
54
	/*!
	 * The requested format is not supported by Monado.
	 */
	XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED = -12,
55
56
57
58
	/*!
	 * The given config was EGL_NO_CONFIG_KHR and EGL_KHR_no_config_context
	 * is not supported by the display.
	 */
Jakob Bornecrantz's avatar
Jakob Bornecrantz committed
59
	XRT_ERROR_EGL_CONFIG_MISSING = -13,
Jakob Bornecrantz's avatar
Jakob Bornecrantz committed
60
61
62
63
	/*!
	 * Failed to initialize threading components.
	 */
	XRT_ERROR_THREADING_INIT_FAILURE = -14,
64
65
66
67
68
	/*!
	 * The client has not created a session on this IPC connection,
	 * which is needed for the given command.
	 */
	XRT_ERROR_IPC_SESSION_NOT_CREATED = -15,
69
} xrt_result_t;