Monado OpenXR Runtime
Loading...
Searching...
No Matches
oxr_resolver_for_profiles.h
Go to the documentation of this file.
1// Copyright 2026, NVIDIA CORPORATION.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Resolve suggested profiles for a device.
6 * @ingroup oxr_main
7 */
8
9#pragma once
10
11#include "xrt/xrt_defines.h"
12#include "xrt/xrt_device.h"
13#include "xrt/xrt_io_cache.h"
14
15#include "oxr_extension_support.h"
18
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24
25/*!
26 * Short-lived result of choosing a suggested profile for one subaction slot
27 * (for example `/user/hand/left`), plus any rebinding needed to apply it.
28 */
30{
31 /*!
32 * The suggested profile to bind for. If no matching profile or rebinding
33 * is found, this and all other fields will be NULL.
34 */
36
37 /*!
38 * Runtime binding profile for @ref profile.
39 */
41
42 /*!
43 * If the device is not the same as the profile, this will be set to the
44 * rebinding profile that applies to the device. If no rebinding profile is
45 * found, this will be NULL.
46 */
48
49 /*!
50 * Runtime binding profile targeted by @ref rebinding_profile.
51 */
53};
54
55/*!
56 * Resolve the binding information for a given device.
57 *
58 * @param log Logger, must not be NULL.
59 * @param slog Sink logger, must not be NULL.
60 * @param registry Binding registry, must not be NULL.
61 * @param suggested_profiles Suggested profiles, must not be NULL.
62 * @param dev Cache device to resolve for, must not be NULL.
63 * @param subaction_path Top-level path being resolved.
64 * @param override_device_name Profile name to prefer before @p dev->name, can be XRT_DEVICE_INVALID.
65 * @param info Binding information, must not be NULL.
66 */
67XRT_NONNULL_ALL void
69 struct oxr_sink_logger *slog,
70 const struct oxr_binding_registry *registry,
71 const struct oxr_suggested_profile_array *suggested_profiles,
72 const struct xrt_io_cache_device *dev,
73 XrPath subaction_path,
74 enum xrt_device_name override_device_name,
75 struct oxr_profile_resolver_info *info);
76
77
78#ifdef __cplusplus
79}
80#endif
Forward declarations for OpenXR state tracker structs.
XRT_NONNULL_ALL void oxr_resolver_populate_profile(struct oxr_logger *log, struct oxr_sink_logger *slog, const struct oxr_binding_registry *registry, const struct oxr_suggested_profile_array *suggested_profiles, const struct xrt_io_cache_device *dev, XrPath subaction_path, enum xrt_device_name override_device_name, struct oxr_profile_resolver_info *info)
Resolve the binding information for a given device.
Definition oxr_resolver_for_profiles.c:179
Holds suggested profile array related functions.
Runtime interaction profile binding data cloned from generated templates.
Definition oxr_binding_profile.h:26
struct oxr_binding_registry * registry
Owning registry.
Definition oxr_binding_profile.h:28
Complete runtime binding registry for all action contexts of an XrInstance.
Definition oxr_binding_registry.h:35
Logger struct that lives on the stack, one for each call client call.
Definition oxr_logger.h:44
Short-lived result of choosing a suggested profile for one subaction slot (for example /user/hand/lef...
Definition oxr_resolver_for_profiles.h:30
const struct oxr_binding_profile * binding_profile
Runtime binding profile for profile.
Definition oxr_resolver_for_profiles.h:40
const struct oxr_suggested_profile * profile
The suggested profile to bind for.
Definition oxr_resolver_for_profiles.h:35
const struct oxr_rebinding_profile * rebinding_profile
If the device is not the same as the profile, this will be set to the rebinding profile that applies ...
Definition oxr_resolver_for_profiles.h:47
const struct oxr_binding_profile * rebinding_target_profile
Runtime binding profile targeted by rebinding_profile.
Definition oxr_resolver_for_profiles.h:52
Maps binding paths from one interaction profile onto another.
Definition oxr_rebinding_profile.h:41
Allocate on the stack, make sure to zero initialize.
Definition oxr_logger.h:92
Manages an array of suggested profiles, does not have a init function but must be zero initialized wh...
Definition oxr_suggested_profile_array.h:30
Client-suggested bindings for one OpenXR interaction profile.
Definition oxr_suggested_profile.h:58
Per-device layout entry describing where a device's inputs and outputs sit in the flattened cache arr...
Definition xrt_io_cache.h:31
Common defines and enums for XRT.
xrt_device_name
A enum that is used to name devices so that the state trackers can reason about the devices easier.
Definition xrt_defines.h:767
Header defining an xrt display or controller device.
Header defining xrt input/output cache.