Monado OpenXR Runtime
oxr_api_verify.h
Go to the documentation of this file.
1// Copyright 2018-2024, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief File for verifying app input into api functions.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @author Korcan Hussein <korcan.hussein@collabora.com>
8 * @ingroup oxr_api
9 */
10
11#pragma once
12
13#include "oxr_frame_sync.h" // iwyu pragma: keep
14
15#include <stddef.h>
16
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22struct oxr_action_set;
24struct oxr_instance;
25struct oxr_logger;
27
28#define OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_thing, THING, name, lookup) \
29 do { \
30 oxr_log_init(log, name); \
31 if (thing == XR_NULL_HANDLE) { \
32 return oxr_error(log, XR_ERROR_HANDLE_INVALID, "(" #thing " == NULL)"); \
33 } \
34 new_thing = (struct oxr_thing *)((uintptr_t)thing); \
35 if (new_thing->handle.debug != OXR_XR_DEBUG_##THING) { \
36 return oxr_error(log, XR_ERROR_HANDLE_INVALID, "(" #thing " == %p)", (void *)new_thing); \
37 } \
38 if (new_thing->handle.state != OXR_HANDLE_STATE_LIVE) { \
39 return oxr_error(log, XR_ERROR_HANDLE_INVALID, "(" #thing " == %p) state == %s", \
40 (void *)new_thing, oxr_handle_state_to_string(new_thing->handle.state)); \
41 } \
42 oxr_log_set_instance(log, lookup); \
43 } while (0)
44
45#define OXR_VERIFY_SET(log, arg, new_arg, oxr_thing, THING) \
46 do { \
47 if (arg == XR_NULL_HANDLE) { \
48 return oxr_error(log, XR_ERROR_HANDLE_INVALID, "(" #arg " == NULL)"); \
49 } \
50 new_arg = (struct oxr_thing *)((uintptr_t)arg); \
51 if (new_arg->handle.debug != OXR_XR_DEBUG_##THING) { \
52 return oxr_error(log, XR_ERROR_HANDLE_INVALID, "(" #arg " == %p)", (void *)new_arg); \
53 } \
54 } while (0)
55
56
57/*!
58 * @addtogroup oxr_api
59 * @{
60 */
61
62// clang-format off
63#define OXR_VERIFY_INSTANCE_AND_INIT_LOG(log, thing, new_thing, name) \
64 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_instance, INSTANCE, name, new_thing)
65#define OXR_VERIFY_MESSENGER_AND_INIT_LOG(log, thing, new_thing, name) \
66 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_messenger, MESSENGER, name, new_thing->inst)
67#define OXR_VERIFY_SESSION_AND_INIT_LOG(log, thing, new_thing, name) \
68 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_session, SESSION, name, new_thing->sys->inst)
69#define OXR_VERIFY_SPACE_AND_INIT_LOG(log, thing, new_thing, name) \
70 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_space, SPACE, name, new_thing->sess->sys->inst)
71#define OXR_VERIFY_ACTION_AND_INIT_LOG(log, thing, new_thing, name) \
72 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_action, ACTION, name, new_thing->act_set->inst)
73#define OXR_VERIFY_SWAPCHAIN_AND_INIT_LOG(log, thing, new_thing, name) \
74 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_swapchain, SWAPCHAIN, name, new_thing->sess->sys->inst)
75#define OXR_VERIFY_ACTIONSET_AND_INIT_LOG(log, thing, new_thing, name) \
76 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_action_set, ACTIONSET, name, new_thing->inst)
77#define OXR_VERIFY_HAND_TRACKER_AND_INIT_LOG(log, thing, new_thing, name) \
78 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_hand_tracker, HTRACKER, name, new_thing->sess->sys->inst)
79#define OXR_VERIFY_FORCE_FEEDBACK_AND_INIT_LOG(log, thing, new_thing, name) \
80 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_force_feedback, FFB, name, new_thing->sess->sys->inst)
81#define OXR_VERIFY_PASSTHROUGH_AND_INIT_LOG(log, thing, new_thing, name) \
82 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_passthrough, PASSTHROUGH, name, new_thing->sess->sys->inst)
83#define OXR_VERIFY_PASSTHROUGH_LAYER_AND_INIT_LOG(log, thing, new_thing, name) \
84 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_passthrough_layer, PASSTHROUGH_LAYER, name, new_thing->sess->sys->inst)
85#define OXR_VERIFY_FACE_TRACKER_HTC_AND_INIT_LOG(log, thing, new_thing, name) \
86 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_facial_tracker_htc, FTRACKER, name, new_thing->sess->sys->inst)
87#define OXR_VERIFY_FACE_TRACKER2_FB_AND_INIT_LOG(log, thing, new_thing, name) \
88 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_face_tracker2_fb, FTRACKER, name, new_thing->sess->sys->inst)
89#define OXR_VERIFY_BODY_TRACKER_FB_AND_INIT_LOG(log, thing, new_thing, name) \
90 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_body_tracker_fb, BTRACKER, name, new_thing->sess->sys->inst)
91#define OXR_VERIFY_XDEVLIST_AND_INIT_LOG(log, thing, new_thing, name) \
92 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_xdev_list, XDEVLIST, name, new_thing->sess->sys->inst)
93#define OXR_VERIFY_PLANE_DETECTOR_AND_INIT_LOG(log, thing, new_thing, name) \
94 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_plane_detector_ext, PLANEDET, name, new_thing->sess->sys->inst)
95#define OXR_VERIFY_FUTURE_AND_INIT_LOG(log, thing, new_thing, name) \
96 OXR_VERIFY_AND_SET_AND_INIT(log, thing, new_thing, oxr_future_ext, FUTURE, name, new_thing->inst); \
97 OXR_VERIFY_FUTURE_VALID(log, new_thing)
98// clang-format on
99
100#define OXR_VERIFY_INSTANCE_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_instance, INSTANCE);
101#define OXR_VERIFY_MESSENGER_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_messenger, MESSENGER);
102#define OXR_VERIFY_SESSION_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_session, SESSION);
103#define OXR_VERIFY_SPACE_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_space, SPACE);
104#define OXR_VERIFY_ACTION_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_action, ACTION);
105#define OXR_VERIFY_SWAPCHAIN_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_swapchain, SWAPCHAIN);
106#define OXR_VERIFY_ACTIONSET_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_action_set, ACTIONSET);
107#define OXR_VERIFY_XDEVLIST_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_xdev_list, XDEVLIST);
108
109#define OXR_VERIFY_FUTURE_NOT_NULL(log, arg, new_arg) OXR_VERIFY_SET(log, arg, new_arg, oxr_future_ext, FUTURE);
110/*!
111 * Checks if a required extension is enabled.
112 *
113 * mixed_case_name should be the extension name without the XR_ prefix.
114 */
115#define OXR_VERIFY_EXTENSION(log, inst, mixed_case_name) \
116 do { \
117 if (!(inst)->extensions.mixed_case_name) { \
118 return oxr_error((log), XR_ERROR_FUNCTION_UNSUPPORTED, \
119 "Requires XR_" #mixed_case_name " extension enabled"); \
120 } \
121 } while (false)
122
123/*!
124 * Checks if either one of two required extensions is enabled.
125 *
126 * mixed_case_name should be the extension name without the XR_ prefix.
127 */
128#define OXR_VERIFY_EXTENSIONS_OR(log, inst, mixed_case_name1, mixed_case_name2) \
129 do { \
130 if (!(inst)->extensions.mixed_case_name1 && !(inst)->extensions.mixed_case_name2) { \
131 return oxr_error((log), XR_ERROR_FUNCTION_UNSUPPORTED, \
132 "Requires XR_" #mixed_case_name1 "or XR_" #mixed_case_name2 \
133 " extension enabled"); \
134 } \
135 } while (false)
136
137/*!
138 * A condition if the instance is created with at least a given OpenXR version
139 */
140#define OXR_API_VERSION_AT_LEAST(inst, major, minor) \
141 ((inst)->openxr_version.major_minor >= XR_MAKE_VERSION(major, minor, 0))
142
143/*!
144 * Checks if the instance is created with at least a given OpenXR version
145 */
146#define OXR_VERIFY_API_VERSION_AT_LEAST(log, inst, major, minor) \
147 do { \
148 if (!OXR_VERSION_AT_LEAST(inst, major, minor)) { \
149 return oxr_error((log), XR_ERROR_FUNCTION_UNSUPPORTED, "Requires OpenXR version %d.%d.x", \
150 major, minor); \
151 } \
152 } while (false)
153
154#define OXR_VERIFY_ARG_NOT_NULL(log, arg) \
155 do { \
156 if (arg == NULL) { \
157 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "(" #arg " == NULL)"); \
158 } \
159 } while (false)
160
161#define OXR_VERIFY_ARG_NOT_ZERO(log, arg) \
162 do { \
163 if (arg == 0) { \
164 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "(" #arg " == 0) must be non-zero"); \
165 } \
166 } while (false)
167
168#define OXR_VERIFY_ARG_ZERO(log, arg) \
169 do { \
170 if (arg != 0) { \
171 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "(" #arg " == 0) must be zero"); \
172 } \
173 } while (false)
174
175#define OXR_VERIFY_ARG_TYPE_CAN_BE_NULL(log, arg, type_enum) \
176 do { \
177 if (arg != NULL && arg->type != type_enum) { \
178 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "(" #arg "->type == %u)", arg->type); \
179 } \
180 } while (false)
181
182#define OXR_VERIFY_ARG_TYPE_AND_NOT_NULL(log, arg, type_enum) \
183 do { \
184 if (arg == NULL) { \
185 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, "(" #arg " == NULL)"); \
186 } \
187 OXR_VERIFY_ARG_TYPE_CAN_BE_NULL(log, arg, type_enum); \
188 } while (false)
189
190/*!
191 * Must only be used with full typed arrays, aka non-basetyped arrays like that
192 * passed into xrEnumerateSwapchainImages.
193 */
194#define OXR_VERIFY_ARG_ARRAY_ELEMENT_TYPE(log, array, index, type_enum) \
195 do { \
196 if ((array)[index].type != type_enum) { \
197 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
198 "(" #array "[%u]->type == 0x%08x) expected 0x%08x", index, \
199 (array)[index].type, type_enum); \
200 } \
201 } while (false)
202
203#define OXR_VERIFY_SUBACTION_PATHS(log, count, paths) \
204 do { \
205 if (count > 0 && paths == NULL) { \
206 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
207 "(" #count ") is not zero but " #paths " is NULL"); \
208 } \
209 } while (false)
210
211#define OXR_VERIFY_ARG_SINGLE_LEVEL_FIXED_LENGTH_PATH(log, path) \
212 do { \
213 XrResult verify_ret = oxr_verify_fixed_size_single_level_path(log, path, ARRAY_SIZE(path), #path); \
214 if (verify_ret != XR_SUCCESS) { \
215 return verify_ret; \
216 } \
217 } while (false)
218
219#define OXR_VERIFY_ARG_LOCALIZED_NAME(log, string) \
220 do { \
221 XrResult verify_ret = oxr_verify_localized_name(log, string, ARRAY_SIZE(string), #string); \
222 if (verify_ret != XR_SUCCESS) { \
223 return verify_ret; \
224 } \
225 } while (false)
226
227#define OXR_VERIFY_POSE(log, p) \
228 do { \
229 if (!math_quat_validate((struct xrt_quat *)&p.orientation)) { \
230 return oxr_error(log, XR_ERROR_POSE_INVALID, "(" #p ".orientation) is not a valid quat"); \
231 } \
232 \
233 if (!math_vec3_validate((struct xrt_vec3 *)&p.position)) { \
234 return oxr_error(log, XR_ERROR_POSE_INVALID, "(" #p ".position) is not valid"); \
235 } \
236 } while (false)
237
238#define OXR_VERIFY_VIEW_CONFIG_TYPE(log, inst, view_conf) \
239 do { \
240 XrResult verify_ret = oxr_verify_view_config_type(log, inst, view_conf, #view_conf); \
241 if (verify_ret != XR_SUCCESS) { \
242 return verify_ret; \
243 } \
244 } while (false)
245
246#define OXR_VERIFY_VIEW_INDEX(log, index) \
247 do { \
248 if (index > 2) { \
249 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
250 "Invalid view index %d, only 2 views supported", index); \
251 } \
252 } while (false)
253
254#define OXR_VERIFY_SWAPCHAIN_USAGE_FLAGS_NOT_MUTUALLY_EXCLUSIVE(log, flags, mutually_exclusive_a, \
255 mutually_exclusive_b) \
256 do { \
257 if (((flags) & (mutually_exclusive_a)) != 0 && ((flags) & (mutually_exclusive_b)) != 0) { \
258 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
259 "(" #flags ") Swapchain usage flags " #mutually_exclusive_a \
260 " and " #mutually_exclusive_b \
261 " are mutually exclusive in this graphics API"); \
262 } \
263 } while (false)
264
265#define OXR_VERIFY_SESSION_NOT_LOST(log, sess) \
266 do { \
267 if (sess->has_lost) { \
268 return oxr_error(log, XR_ERROR_SESSION_LOST, "Session is lost"); \
269 } \
270 } while (false)
271
272#define OXR_VERIFY_SESSION_RUNNING(log, sess) \
273 do { \
274 if (!oxr_frame_sync_is_session_running(&sess->frame_sync)) { \
275 return oxr_error(log, XR_ERROR_SESSION_NOT_RUNNING, "Session is not running"); \
276 } \
277 } while (false)
278
279#define OXR_VERIFY_PASSTHROUGH_FLAGS(log, flags) \
280 if (flags == 0 || \
281 (flags & (XR_PASSTHROUGH_IS_RUNNING_AT_CREATION_BIT_FB | XR_PASSTHROUGH_LAYER_DEPTH_BIT_FB)) == 0) \
282 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
283 "flags is not a valid combination of XrPassthroughFlagBitsFB values");
284
285#define OXR_VERIFY_PASSTHROUGH_LAYER_PURPOSE(log, purpose) \
286 if ((purpose != XR_PASSTHROUGH_LAYER_PURPOSE_RECONSTRUCTION_FB && \
287 purpose != XR_PASSTHROUGH_LAYER_PURPOSE_PROJECTED_FB && \
288 purpose != XR_PASSTHROUGH_LAYER_PURPOSE_TRACKED_KEYBOARD_HANDS_FB && \
289 purpose != XR_PASSTHROUGH_LAYER_PURPOSE_TRACKED_KEYBOARD_MASKED_HANDS_FB)) \
290 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
291 "purpose is not a valid XrPassthroughLayerPurposeFB value");
292
293#define OXR_VERIFY_PASSTHROUGH_LAYER_STYLE(log, style) \
294 do { \
295 uint32_t duplicate_check = 0; \
296 const XrPassthroughStyleFB *next = style->next; \
297 while (next) { \
298 if (next->type != XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_RGBA_FB && \
299 next->type != XR_TYPE_PASSTHROUGH_COLOR_MAP_MONO_TO_MONO_FB && \
300 next->type != XR_TYPE_PASSTHROUGH_BRIGHTNESS_CONTRAST_SATURATION_FB) \
301 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
302 "style next structure chain contains invalid pointers"); \
303 if ((next->type & duplicate_check) != 0) \
304 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, \
305 "style next structure chain contains duplicate items"); \
306 duplicate_check |= next->type; \
307 next = (const XrPassthroughStyleFB *)next->next; \
308 } \
309 } while (false)
310
311#define OXR_VERIFY_FORM_FACTOR(log, form_factor) \
312 do { \
313 XrFormFactor _form_factor = (form_factor); \
314 if (_form_factor != XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY && \
315 _form_factor != XR_FORM_FACTOR_HANDHELD_DISPLAY) { \
316 \
317 return oxr_error(log, XR_ERROR_FORM_FACTOR_UNSUPPORTED, \
318 "(" #form_factor " == 0x%08x) is not a valid form factor", _form_factor); \
319 } \
320 } while (false)
321
322#define OXR_VERIFY_HAND_TRACKING_DATA_SOURCE_OR_NULL(log, data_source_info) \
323 do { \
324 if (data_source_info != NULL) { \
325 XrResult verify_ret = oxr_verify_XrHandTrackingDataSourceInfoEXT(log, data_source_info); \
326 if (verify_ret != XR_SUCCESS) { \
327 return verify_ret; \
328 } \
329 } \
330 } while (false)
331
332#define OXR_VERIFY_FUTURE_VALID(LOG, OXR_FT) \
333 do { \
334 if (OXR_FT->xft == NULL) { \
335 return oxr_error(LOG, XR_ERROR_FUTURE_INVALID_EXT, "future is not valid"); \
336 } \
337 } while (false)
338
339
340/*
341 *
342 * Implementation in oxr_verify.cpp
343 *
344 */
345
346XrResult
347oxr_verify_full_path_c(struct oxr_logger *log, const char *path, const char *name);
348
349/*!
350 * Verify a full path.
351 *
352 * Length not including zero terminator character but must be there.
353 */
354XrResult
355oxr_verify_full_path(struct oxr_logger *log, const char *path, size_t length, const char *name);
356
357/*!
358 * Verify a single path level that sits inside of a fixed sized array.
359 */
360XrResult
362 const char *path,
363 uint32_t array_size,
364 const char *name);
365
366/*!
367 * Verify an arbitrary UTF-8 string that sits inside of a fixed sized array.
368 */
369XrResult
370oxr_verify_localized_name(struct oxr_logger * /*log*/, const char *string, uint32_t array_size, const char *name);
371
372/*!
373 * Verify a set of subaction paths for action creation.
374 */
375XrResult
377 struct oxr_instance *inst,
378 uint32_t countSubactionPaths,
379 const XrPath *subactionPaths,
380 const char *variable);
381
382/*!
383 * Verify a set of subaction paths for action sync.
384 */
385XrResult
387 const struct oxr_instance *inst,
388 const struct oxr_action_set *act_set,
389 XrPath path,
390 uint32_t index);
391
392/*!
393 * Verify a set of subaction paths for action state get.
394 */
395XrResult
397 struct oxr_instance *inst,
398 XrPath path,
399 const struct oxr_subaction_paths *act_subaction_paths,
400 struct oxr_subaction_paths *out_subaction_paths,
401 const char *variable);
402
403XrResult
404oxr_verify_extensions(struct oxr_logger *log, const struct oxr_extension_status *extensions);
405
406XrResult
407oxr_verify_view_config_type(struct oxr_logger *log,
408 struct oxr_instance *inst,
409 XrViewConfigurationType view_conf,
410 const char *view_conf_name);
411
412XrResult
413oxr_verify_XrSessionCreateInfo(struct oxr_logger * /*log*/,
414 const struct oxr_instance * /*inst*/,
415 const XrSessionCreateInfo * /*createInfo*/);
416
417#if defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
418XrResult
419oxr_verify_XrGraphicsBindingOpenGLXlibKHR(struct oxr_logger * /*log*/, const XrGraphicsBindingOpenGLXlibKHR * /*next*/);
420#endif // defined(XR_USE_PLATFORM_XLIB) && defined(XR_USE_GRAPHICS_API_OPENGL)
421
422#if defined(XR_USE_PLATFORM_WIN32) && defined(XR_USE_GRAPHICS_API_OPENGL)
423XrResult
424oxr_verify_XrGraphicsBindingOpenGLWin32KHR(struct oxr_logger * /*log*/,
425 const XrGraphicsBindingOpenGLWin32KHR * /*next*/);
426#endif // defined(XR_USE_PLATFORM_WIN32) && defined(XR_USE_GRAPHICS_API_OPENGL)
427
428#if defined(XR_USE_GRAPHICS_API_VULKAN)
429XrResult
430oxr_verify_XrGraphicsBindingVulkanKHR(struct oxr_logger * /*log*/, const XrGraphicsBindingVulkanKHR * /*next*/);
431#endif // defined(XR_USE_GRAPHICS_API_VULKAN)
432
433#if defined(XR_USE_PLATFORM_EGL)
434XrResult
435oxr_verify_XrGraphicsBindingEGLMNDX(struct oxr_logger *log, const XrGraphicsBindingEGLMNDX *next);
436#endif // defined(XR_USE_PLATFORM_EGL)
437
438#if defined(XR_USE_PLATFORM_ANDROID) && defined(XR_USE_GRAPHICS_API_OPENGL_ES)
439XrResult
440oxr_verify_XrGraphicsBindingOpenGLESAndroidKHR(struct oxr_logger *, const XrGraphicsBindingOpenGLESAndroidKHR *);
441#endif // defined(XR_USE_PLATFORM_ANDROID) &&
442 // defined(XR_USE_GRAPHICS_API_OPENGL_ES)
443
444#if defined(XR_USE_GRAPHICS_API_D3D11)
445XrResult
446oxr_verify_XrGraphicsBindingD3D11KHR(struct oxr_logger *, const XrGraphicsBindingD3D11KHR *);
447#endif // defined(XR_USE_GRAPHICS_API_D3D11)
448
449#if defined(XR_USE_GRAPHICS_API_D3D12)
450XrResult
451oxr_verify_XrGraphicsBindingD3D12KHR(struct oxr_logger *, const XrGraphicsBindingD3D12KHR *);
452#endif // defined(XR_USE_GRAPHICS_API_D3D12)
453
454#ifdef XR_EXT_dpad_binding
455XrResult
456oxr_verify_XrInteractionProfileDpadBindingEXT(struct oxr_logger *,
457 const XrInteractionProfileDpadBindingEXT *,
458 const char *error_prefix);
459#endif // XR_EXT_dpad_binding
460
461#ifdef OXR_HAVE_EXT_hand_tracking_data_source
462XrResult
463oxr_verify_XrHandTrackingDataSourceInfoEXT(struct oxr_logger *, const XrHandTrackingDataSourceInfoEXT *);
464#endif // XR_EXT_hand_tracking_data_source
465
466/*!
467 * @}
468 */
469
470
471#ifdef __cplusplus
472}
473#endif
XrResult oxr_verify_subaction_paths_create(struct oxr_logger *log, struct oxr_instance *inst, uint32_t countSubactionPaths, const XrPath *subactionPaths, const char *variable)
Verify a set of subaction paths for action creation.
Definition: oxr_verify.c:298
XrResult oxr_verify_subaction_path_sync(struct oxr_logger *log, const struct oxr_instance *inst, const struct oxr_action_set *act_set, XrPath path, uint32_t index)
Verify a set of subaction paths for action sync.
Definition: oxr_verify.c:319
XrResult oxr_verify_fixed_size_single_level_path(struct oxr_logger *, const char *path, uint32_t array_size, const char *name)
Verify a single path level that sits inside of a fixed sized array.
Definition: oxr_verify.c:64
XrResult oxr_verify_subaction_path_get(struct oxr_logger *log, struct oxr_instance *inst, XrPath path, const struct oxr_subaction_paths *act_subaction_paths, struct oxr_subaction_paths *out_subaction_paths, const char *variable)
Verify a set of subaction paths for action state get.
Definition: oxr_verify.c:349
XrResult oxr_verify_full_path(struct oxr_logger *log, const char *path, size_t length, const char *name)
Verify a full path.
Definition: oxr_verify.c:139
XrResult oxr_verify_localized_name(struct oxr_logger *, const char *string, uint32_t array_size, const char *name)
Verify an arbitrary UTF-8 string that sits inside of a fixed sized array.
Definition: oxr_verify.c:95
The objects that handle session running status and blocking of xrWaitFrame.
A group of actions.
Definition: oxr_objects.h:2525
Structure tracking which extensions are enabled for a given instance.
Definition: oxr_objects.h:1660
Main object that ties everything together.
Definition: oxr_objects.h:1673
Logger struct that lives on the stack, one for each call client call.
Definition: oxr_logger.h:40
A parsed equivalent of a list of sub-action paths.
Definition: oxr_objects.h:2102