Monado OpenXR Runtime
xrt_limits.h
Go to the documentation of this file.
1// Copyright 2019-2022, Collabora, Ltd.
2// Copyright 2025, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Header for limits of the XRT interfaces.
7 * @author Jakob Bornecrantz <jakob@collabora.com>
8 * @ingroup xrt_iface
9 */
10
11#pragma once
12
13#include "xrt/xrt_compiler.h"
14
15
16/*!
17 * @addtogroup xrt_iface
18 * @{
19 */
20/*
21 * Max number of views supported by a compositor, artificial limit.
22 */
23#define XRT_MAX_VIEWS 2
24
25/*
26 * System needs to support at least 4 views for stereo with foveated inset.
27 */
28#define XRT_MAX_COMPOSITOR_VIEW_CONFIGS_VIEW_COUNT (XRT_MAX_VIEWS > 4 ? XRT_MAX_VIEWS : 4)
29
30/*
31 * Max number of view configurations a system compositor can support simultaneously.
32 */
33#define XRT_MAX_COMPOSITOR_VIEW_CONFIGS_COUNT 2
34
35/*!
36 * Maximum number of handles sent in one call.
37 */
38#define XRT_MAX_IPC_HANDLES 16
39
40/*!
41 * Max swapchain images, artificial limit.
42 *
43 * Must be smaller or the same as XRT_MAX_IPC_HANDLES.
44 */
45#define XRT_MAX_SWAPCHAIN_IMAGES 8
46
47/*!
48 * Max formats supported by a compositor, artificial limit.
49 */
50#define XRT_MAX_SWAPCHAIN_FORMATS 16
51
52/*!
53 * Max number of plane orientations that can be requested at a time.
54 */
55#define XRT_MAX_PLANE_ORIENTATIONS_EXT 256
56
57/*!
58 * Max number of plane semantic types that can be requested at a time.
59 */
60#define XRT_MAX_PLANE_SEMANTIC_TYPE_EXT 256
61
62/*!
63 * Max formats in the swapchain creation info formats list, artificial limit.
64 */
65#define XRT_MAX_SWAPCHAIN_CREATE_INFO_FORMAT_LIST_COUNT 8
66
67/*!
68 * Max number of supported display refresh rates, artificial limit.
69 */
70#define XRT_MAX_SUPPORTED_REFRESH_RATES 16
71
72/*!
73 * Max number of layers which can be handled at once.
74 */
75#define XRT_MAX_LAYERS 128
76
77/*!
78 * @}
79 */
Header holding common defines.