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