Monado OpenXR Runtime
oxr_extension_support.h
Go to the documentation of this file.
1// Copyright 2019-2024, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Macros for generating extension-related tables and code and
6 * inspecting Monado's extension support.
7 *
8 * MOSTLY GENERATED CODE - see below!
9 *
10 * To add support for a new extension, edit and run generate_oxr_ext_support.py,
11 * then run clang-format on this file. Two entire chunks of this file get
12 * replaced by that script: comments indicate where they are.
13 *
14 * @author Rylie Pavlik <rylie.pavlik@collabora.com>
15 */
16
17#pragma once
18
19#include "xrt/xrt_config_build.h"
21
22// beginning of GENERATED defines - do not modify - used by scripts
23
24/*
25 * XR_KHR_android_create_instance
26 */
27#if defined(XR_KHR_android_create_instance) && defined(XR_USE_PLATFORM_ANDROID)
28#define OXR_HAVE_KHR_android_create_instance
29#define OXR_EXTENSION_SUPPORT_KHR_android_create_instance(_) _(KHR_android_create_instance, KHR_ANDROID_CREATE_INSTANCE)
30#else
31#define OXR_EXTENSION_SUPPORT_KHR_android_create_instance(_)
32#endif
33
34
35/*
36 * XR_KHR_android_thread_settings
37 */
38#if defined(XR_KHR_android_thread_settings) && defined(XR_USE_PLATFORM_ANDROID)
39#define OXR_HAVE_KHR_android_thread_settings
40#define OXR_EXTENSION_SUPPORT_KHR_android_thread_settings(_) _(KHR_android_thread_settings, KHR_ANDROID_THREAD_SETTINGS)
41#else
42#define OXR_EXTENSION_SUPPORT_KHR_android_thread_settings(_)
43#endif
44
45
46/*
47 * XR_KHR_binding_modification
48 */
49#if defined(XR_KHR_binding_modification)
50#define OXR_HAVE_KHR_binding_modification
51#define OXR_EXTENSION_SUPPORT_KHR_binding_modification(_) _(KHR_binding_modification, KHR_BINDING_MODIFICATION)
52#else
53#define OXR_EXTENSION_SUPPORT_KHR_binding_modification(_)
54#endif
55
56
57/*
58 * XR_KHR_composition_layer_color_scale_bias
59 */
60#if defined(XR_KHR_composition_layer_color_scale_bias) && defined(XRT_FEATURE_OPENXR_LAYER_COLOR_SCALE_BIAS)
61#define OXR_HAVE_KHR_composition_layer_color_scale_bias
62#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_color_scale_bias(_) \
63 _(KHR_composition_layer_color_scale_bias, KHR_COMPOSITION_LAYER_COLOR_SCALE_BIAS)
64#else
65#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_color_scale_bias(_)
66#endif
67
68
69/*
70 * XR_KHR_composition_layer_cube
71 */
72#if defined(XR_KHR_composition_layer_cube) && defined(XRT_FEATURE_OPENXR_LAYER_CUBE)
73#define OXR_HAVE_KHR_composition_layer_cube
74#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_cube(_) _(KHR_composition_layer_cube, KHR_COMPOSITION_LAYER_CUBE)
75#else
76#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_cube(_)
77#endif
78
79
80/*
81 * XR_KHR_composition_layer_cylinder
82 */
83#if defined(XR_KHR_composition_layer_cylinder) && defined(XRT_FEATURE_OPENXR_LAYER_CYLINDER)
84#define OXR_HAVE_KHR_composition_layer_cylinder
85#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_cylinder(_) \
86 _(KHR_composition_layer_cylinder, KHR_COMPOSITION_LAYER_CYLINDER)
87#else
88#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_cylinder(_)
89#endif
90
91
92/*
93 * XR_KHR_composition_layer_depth
94 */
95#if defined(XR_KHR_composition_layer_depth) && defined(XRT_FEATURE_OPENXR_LAYER_DEPTH)
96#define OXR_HAVE_KHR_composition_layer_depth
97#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) _(KHR_composition_layer_depth, KHR_COMPOSITION_LAYER_DEPTH)
98#else
99#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_)
100#endif
101
102
103/*
104 * XR_KHR_composition_layer_equirect
105 */
106#if defined(XR_KHR_composition_layer_equirect) && defined(XRT_FEATURE_OPENXR_LAYER_EQUIRECT1)
107#define OXR_HAVE_KHR_composition_layer_equirect
108#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \
109 _(KHR_composition_layer_equirect, KHR_COMPOSITION_LAYER_EQUIRECT)
110#else
111#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_)
112#endif
113
114
115/*
116 * XR_KHR_composition_layer_equirect2
117 */
118#if defined(XR_KHR_composition_layer_equirect2) && defined(XRT_FEATURE_OPENXR_LAYER_EQUIRECT2)
119#define OXR_HAVE_KHR_composition_layer_equirect2
120#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) \
121 _(KHR_composition_layer_equirect2, KHR_COMPOSITION_LAYER_EQUIRECT2)
122#else
123#define OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_)
124#endif
125
126
127/*
128 * XR_KHR_convert_timespec_time
129 */
130#if defined(XR_KHR_convert_timespec_time) && defined(XR_USE_TIMESPEC) && (!defined(XR_USE_PLATFORM_WIN32))
131#define OXR_HAVE_KHR_convert_timespec_time
132#define OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) _(KHR_convert_timespec_time, KHR_CONVERT_TIMESPEC_TIME)
133#else
134#define OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_)
135#endif
136
137
138/*
139 * XR_KHR_D3D11_enable
140 */
141#if defined(XR_KHR_D3D11_enable) && defined(XR_USE_GRAPHICS_API_D3D11)
142#define OXR_HAVE_KHR_D3D11_enable
143#define OXR_EXTENSION_SUPPORT_KHR_D3D11_enable(_) _(KHR_D3D11_enable, KHR_D3D11_ENABLE)
144#else
145#define OXR_EXTENSION_SUPPORT_KHR_D3D11_enable(_)
146#endif
147
148
149/*
150 * XR_KHR_D3D12_enable
151 */
152#if defined(XR_KHR_D3D12_enable) && defined(XR_USE_GRAPHICS_API_D3D12)
153#define OXR_HAVE_KHR_D3D12_enable
154#define OXR_EXTENSION_SUPPORT_KHR_D3D12_enable(_) _(KHR_D3D12_enable, KHR_D3D12_ENABLE)
155#else
156#define OXR_EXTENSION_SUPPORT_KHR_D3D12_enable(_)
157#endif
158
159
160/*
161 * XR_KHR_extended_struct_name_lengths
162 */
163#if defined(XR_KHR_extended_struct_name_lengths)
164#define OXR_HAVE_KHR_extended_struct_name_lengths
165#define OXR_EXTENSION_SUPPORT_KHR_extended_struct_name_lengths(_) \
166 _(KHR_extended_struct_name_lengths, KHR_EXTENDED_STRUCT_NAME_LENGTHS)
167#else
168#define OXR_EXTENSION_SUPPORT_KHR_extended_struct_name_lengths(_)
169#endif
170
171
172/*
173 * XR_KHR_loader_init
174 */
175#if defined(XR_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
176#define OXR_HAVE_KHR_loader_init
177#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_) _(KHR_loader_init, KHR_LOADER_INIT)
178#else
179#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_)
180#endif
181
182
183/*
184 * XR_KHR_loader_init_android
185 */
186#if defined(XR_KHR_loader_init_android) && defined(OXR_HAVE_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
187#define OXR_HAVE_KHR_loader_init_android
188#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) _(KHR_loader_init_android, KHR_LOADER_INIT_ANDROID)
189#else
190#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_)
191#endif
192
193
194/*
195 * XR_KHR_locate_spaces
196 */
197#if defined(XR_KHR_locate_spaces)
198#define OXR_HAVE_KHR_locate_spaces
199#define OXR_EXTENSION_SUPPORT_KHR_locate_spaces(_) _(KHR_locate_spaces, KHR_LOCATE_SPACES)
200#else
201#define OXR_EXTENSION_SUPPORT_KHR_locate_spaces(_)
202#endif
203
204
205/*
206 * XR_KHR_maintenance1
207 */
208#if defined(XR_KHR_maintenance1)
209#define OXR_HAVE_KHR_maintenance1
210#define OXR_EXTENSION_SUPPORT_KHR_maintenance1(_) _(KHR_maintenance1, KHR_MAINTENANCE1)
211#else
212#define OXR_EXTENSION_SUPPORT_KHR_maintenance1(_)
213#endif
214
215
216/*
217 * XR_KHR_opengl_enable
218 */
219#if defined(XR_KHR_opengl_enable) && defined(XR_USE_GRAPHICS_API_OPENGL)
220#define OXR_HAVE_KHR_opengl_enable
221#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) _(KHR_opengl_enable, KHR_OPENGL_ENABLE)
222#else
223#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_)
224#endif
225
226
227/*
228 * XR_KHR_opengl_es_enable
229 */
230#if defined(XR_KHR_opengl_es_enable) && defined(XR_USE_GRAPHICS_API_OPENGL_ES)
231#define OXR_HAVE_KHR_opengl_es_enable
232#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) _(KHR_opengl_es_enable, KHR_OPENGL_ES_ENABLE)
233#else
234#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_)
235#endif
236
237
238/*
239 * XR_KHR_swapchain_usage_input_attachment_bit
240 */
241#if defined(XR_KHR_swapchain_usage_input_attachment_bit)
242#define OXR_HAVE_KHR_swapchain_usage_input_attachment_bit
243#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
244 _(KHR_swapchain_usage_input_attachment_bit, KHR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
245#else
246#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_)
247#endif
248
249
250/*
251 * XR_KHR_visibility_mask
252 */
253#if defined(XR_KHR_visibility_mask) && defined(XRT_FEATURE_OPENXR_VISIBILITY_MASK)
254#define OXR_HAVE_KHR_visibility_mask
255#define OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_) _(KHR_visibility_mask, KHR_VISIBILITY_MASK)
256#else
257#define OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_)
258#endif
259
260
261/*
262 * XR_KHR_vulkan_enable
263 */
264#if defined(XR_KHR_vulkan_enable) && defined(XR_USE_GRAPHICS_API_VULKAN)
265#define OXR_HAVE_KHR_vulkan_enable
266#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) _(KHR_vulkan_enable, KHR_VULKAN_ENABLE)
267#else
268#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_)
269#endif
270
271
272/*
273 * XR_KHR_vulkan_enable2
274 */
275#if defined(XR_KHR_vulkan_enable2) && defined(XR_USE_GRAPHICS_API_VULKAN)
276#define OXR_HAVE_KHR_vulkan_enable2
277#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) _(KHR_vulkan_enable2, KHR_VULKAN_ENABLE2)
278#else
279#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_)
280#endif
281
282
283/*
284 * XR_KHR_vulkan_swapchain_format_list
285 */
286#if defined(XR_KHR_vulkan_swapchain_format_list) && defined(XR_USE_GRAPHICS_API_VULKAN) && \
287 defined(XRT_FEATURE_OPENXR_VULKAN_SWAPCHAIN_FORMAT_LIST)
288#define OXR_HAVE_KHR_vulkan_swapchain_format_list
289#define OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_) \
290 _(KHR_vulkan_swapchain_format_list, KHR_VULKAN_SWAPCHAIN_FORMAT_LIST)
291#else
292#define OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_)
293#endif
294
295
296/*
297 * XR_KHR_win32_convert_performance_counter_time
298 */
299#if defined(XR_KHR_win32_convert_performance_counter_time) && defined(XR_USE_PLATFORM_WIN32)
300#define OXR_HAVE_KHR_win32_convert_performance_counter_time
301#define OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_) \
302 _(KHR_win32_convert_performance_counter_time, KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME)
303#else
304#define OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_)
305#endif
306
307
308/*
309 * XR_EXT_active_action_set_priority
310 */
311#if defined(XR_EXT_active_action_set_priority) && defined(XRT_FEATURE_OPENXR_ACTIVE_ACTION_SET_PRIORITY)
312#define OXR_HAVE_EXT_active_action_set_priority
313#define OXR_EXTENSION_SUPPORT_EXT_active_action_set_priority(_) \
314 _(EXT_active_action_set_priority, EXT_ACTIVE_ACTION_SET_PRIORITY)
315#else
316#define OXR_EXTENSION_SUPPORT_EXT_active_action_set_priority(_)
317#endif
318
319
320/*
321 * XR_EXT_debug_utils
322 */
323#if defined(XR_EXT_debug_utils) && defined(XRT_FEATURE_OPENXR_DEBUG_UTILS)
324#define OXR_HAVE_EXT_debug_utils
325#define OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) _(EXT_debug_utils, EXT_DEBUG_UTILS)
326#else
327#define OXR_EXTENSION_SUPPORT_EXT_debug_utils(_)
328#endif
329
330
331/*
332 * XR_EXT_dpad_binding
333 */
334#if defined(XR_EXT_dpad_binding)
335#define OXR_HAVE_EXT_dpad_binding
336#define OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_) _(EXT_dpad_binding, EXT_DPAD_BINDING)
337#else
338#define OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_)
339#endif
340
341
342/*
343 * XR_EXT_eye_gaze_interaction
344 */
345#if defined(XR_EXT_eye_gaze_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE)
346#define OXR_HAVE_EXT_eye_gaze_interaction
347#define OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_) _(EXT_eye_gaze_interaction, EXT_EYE_GAZE_INTERACTION)
348#else
349#define OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_)
350#endif
351
352
353/*
354 * XR_EXT_hand_interaction
355 */
356#if defined(XR_EXT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND)
357#define OXR_HAVE_EXT_hand_interaction
358#define OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_) _(EXT_hand_interaction, EXT_HAND_INTERACTION)
359#else
360#define OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_)
361#endif
362
363
364/*
365 * XR_EXT_hand_tracking
366 */
367#if defined(XR_EXT_hand_tracking) && defined(XRT_FEATURE_OPENXR_HAND_TRACKING_EXT)
368#define OXR_HAVE_EXT_hand_tracking
369#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) _(EXT_hand_tracking, EXT_HAND_TRACKING)
370#else
371#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_)
372#endif
373
374
375/*
376 * XR_EXT_hp_mixed_reality_controller
377 */
378#if defined(XR_EXT_hp_mixed_reality_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
379#define OXR_HAVE_EXT_hp_mixed_reality_controller
380#define OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_) \
381 _(EXT_hp_mixed_reality_controller, EXT_HP_MIXED_REALITY_CONTROLLER)
382#else
383#define OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_)
384#endif
385
386
387/*
388 * XR_EXT_local_floor
389 */
390#if defined(XR_EXT_local_floor) && defined(XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR)
391#define OXR_HAVE_EXT_local_floor
392#define OXR_EXTENSION_SUPPORT_EXT_local_floor(_) _(EXT_local_floor, EXT_LOCAL_FLOOR)
393#else
394#define OXR_EXTENSION_SUPPORT_EXT_local_floor(_)
395#endif
396
397
398/*
399 * XR_EXT_palm_pose
400 */
401#if defined(XR_EXT_palm_pose) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE)
402#define OXR_HAVE_EXT_palm_pose
403#define OXR_EXTENSION_SUPPORT_EXT_palm_pose(_) _(EXT_palm_pose, EXT_PALM_POSE)
404#else
405#define OXR_EXTENSION_SUPPORT_EXT_palm_pose(_)
406#endif
407
408
409/*
410 * XR_EXT_performance_settings
411 */
412#if defined(XR_EXT_performance_settings) && defined(XRT_FEATURE_OPENXR_PERFORMANCE_SETTINGS)
413#define OXR_HAVE_EXT_performance_settings
414#define OXR_EXTENSION_SUPPORT_EXT_performance_settings(_) _(EXT_performance_settings, EXT_PERFORMANCE_SETTINGS)
415#else
416#define OXR_EXTENSION_SUPPORT_EXT_performance_settings(_)
417#endif
418
419
420/*
421 * XR_EXT_samsung_odyssey_controller
422 */
423#if defined(XR_EXT_samsung_odyssey_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
424#define OXR_HAVE_EXT_samsung_odyssey_controller
425#define OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_) \
426 _(EXT_samsung_odyssey_controller, EXT_SAMSUNG_ODYSSEY_CONTROLLER)
427#else
428#define OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_)
429#endif
430
431
432/*
433 * XR_BD_controller_interaction
434 */
435#if defined(XR_BD_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_BYTEDANCE)
436#define OXR_HAVE_BD_controller_interaction
437#define OXR_EXTENSION_SUPPORT_BD_controller_interaction(_) _(BD_controller_interaction, BD_CONTROLLER_INTERACTION)
438#else
439#define OXR_EXTENSION_SUPPORT_BD_controller_interaction(_)
440#endif
441
442
443/*
444 * XR_FB_body_tracking
445 */
446#if defined(XR_FB_body_tracking) && defined(XRT_FEATURE_OPENXR_BODY_TRACKING_FB)
447#define OXR_HAVE_FB_body_tracking
448#define OXR_EXTENSION_SUPPORT_FB_body_tracking(_) _(FB_body_tracking, FB_BODY_TRACKING)
449#else
450#define OXR_EXTENSION_SUPPORT_FB_body_tracking(_)
451#endif
452
453
454/*
455 * XR_FB_composition_layer_alpha_blend
456 */
457#if defined(XR_FB_composition_layer_alpha_blend) && defined(XRT_FEATURE_OPENXR_LAYER_FB_ALPHA_BLEND)
458#define OXR_HAVE_FB_composition_layer_alpha_blend
459#define OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_) \
460 _(FB_composition_layer_alpha_blend, FB_COMPOSITION_LAYER_ALPHA_BLEND)
461#else
462#define OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_)
463#endif
464
465
466/*
467 * XR_FB_composition_layer_image_layout
468 */
469#if defined(XR_FB_composition_layer_image_layout) && defined(XRT_FEATURE_OPENXR_LAYER_FB_IMAGE_LAYOUT)
470#define OXR_HAVE_FB_composition_layer_image_layout
471#define OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_) \
472 _(FB_composition_layer_image_layout, FB_COMPOSITION_LAYER_IMAGE_LAYOUT)
473#else
474#define OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_)
475#endif
476
477
478/*
479 * XR_FB_composition_layer_settings
480 */
481#if defined(XR_FB_composition_layer_settings) && defined(XRT_FEATURE_OPENXR_LAYER_FB_SETTINGS)
482#define OXR_HAVE_FB_composition_layer_settings
483#define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_) \
484 _(FB_composition_layer_settings, FB_COMPOSITION_LAYER_SETTINGS)
485#else
486#define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_)
487#endif
488
489
490/*
491 * XR_FB_composition_layer_depth_test
492 */
493#if defined(XR_FB_composition_layer_depth_test) && defined(XRT_FEATURE_OPENXR_LAYER_FB_DEPTH_TEST)
494#define OXR_HAVE_FB_composition_layer_depth_test
495#define OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_) \
496 _(FB_composition_layer_depth_test, FB_COMPOSITION_LAYER_DEPTH_TEST)
497#else
498#define OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_)
499#endif
500
501
502/*
503 * XR_FB_face_tracking2
504 */
505#if defined(XR_FB_face_tracking2) && defined(XRT_FEATURE_OPENXR_FACE_TRACKING2_FB)
506#define OXR_HAVE_FB_face_tracking2
507#define OXR_EXTENSION_SUPPORT_FB_face_tracking2(_) _(FB_face_tracking2, FB_FACE_TRACKING2)
508#else
509#define OXR_EXTENSION_SUPPORT_FB_face_tracking2(_)
510#endif
511
512
513/*
514 * XR_FB_display_refresh_rate
515 */
516#if defined(XR_FB_display_refresh_rate) && defined(XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE)
517#define OXR_HAVE_FB_display_refresh_rate
518#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) _(FB_display_refresh_rate, FB_DISPLAY_REFRESH_RATE)
519#else
520#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_)
521#endif
522
523
524/*
525 * XR_FB_haptic_pcm
526 */
527#if defined(XR_FB_haptic_pcm) && defined(XRT_FEATURE_OPENXR_HAPTIC_PCM)
528#define OXR_HAVE_FB_haptic_pcm
529#define OXR_EXTENSION_SUPPORT_FB_haptic_pcm(_) _(FB_haptic_pcm, FB_HAPTIC_PCM)
530#else
531#define OXR_EXTENSION_SUPPORT_FB_haptic_pcm(_)
532#endif
533
534
535/*
536 * XR_FB_passthrough
537 */
538#if defined(XR_FB_passthrough) && defined(XRT_FEATURE_OPENXR_LAYER_FB_PASSTHROUGH)
539#define OXR_HAVE_FB_passthrough
540#define OXR_EXTENSION_SUPPORT_FB_passthrough(_) _(FB_passthrough, FB_PASSTHROUGH)
541#else
542#define OXR_EXTENSION_SUPPORT_FB_passthrough(_)
543#endif
544
545
546/*
547 * XR_FB_touch_controller_pro
548 */
549#if defined(XR_FB_touch_controller_pro) && defined(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PRO)
550#define OXR_HAVE_FB_touch_controller_pro
551#define OXR_EXTENSION_SUPPORT_FB_touch_controller_pro(_) _(FB_touch_controller_pro, FB_TOUCH_CONTROLLER_PRO)
552#else
553#define OXR_EXTENSION_SUPPORT_FB_touch_controller_pro(_)
554#endif
555
556
557/*
558 * XR_FB_touch_controller_proximity
559 */
560#if defined(XR_FB_touch_controller_proximity) && defined(XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY)
561#define OXR_HAVE_FB_touch_controller_proximity
562#define OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_) \
563 _(FB_touch_controller_proximity, FB_TOUCH_CONTROLLER_PROXIMITY)
564#else
565#define OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_)
566#endif
567
568
569/*
570 * XR_HTC_facial_tracking
571 */
572#if defined(XR_HTC_facial_tracking) && defined(XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC)
573#define OXR_HAVE_HTC_facial_tracking
574#define OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_) _(HTC_facial_tracking, HTC_FACIAL_TRACKING)
575#else
576#define OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_)
577#endif
578
579
580/*
581 * XR_META_body_tracking_full_body
582 */
583#if defined(XR_META_body_tracking_full_body) && defined(XRT_FEATURE_OPENXR_BODY_TRACKING_FULL_BODY_META)
584#define OXR_HAVE_META_body_tracking_full_body
585#define OXR_EXTENSION_SUPPORT_META_body_tracking_full_body(_) \
586 _(META_body_tracking_full_body, META_BODY_TRACKING_FULL_BODY)
587#else
588#define OXR_EXTENSION_SUPPORT_META_body_tracking_full_body(_)
589#endif
590
591
592/*
593 * XR_META_touch_controller_plus
594 */
595#if defined(XR_META_touch_controller_plus) && defined(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PLUS)
596#define OXR_HAVE_META_touch_controller_plus
597#define OXR_EXTENSION_SUPPORT_META_touch_controller_plus(_) _(META_touch_controller_plus, META_TOUCH_CONTROLLER_PLUS)
598#else
599#define OXR_EXTENSION_SUPPORT_META_touch_controller_plus(_)
600#endif
601
602
603/*
604 * XR_ML_ml2_controller_interaction
605 */
606#if defined(XR_ML_ml2_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_ML2)
607#define OXR_HAVE_ML_ml2_controller_interaction
608#define OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
609 _(ML_ml2_controller_interaction, ML_ML2_CONTROLLER_INTERACTION)
610#else
611#define OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_)
612#endif
613
614
615/*
616 * XR_EXT_plane_detection
617 */
618#if defined(XR_EXT_plane_detection) && defined(XRT_FEATURE_OPENXR_PLANE_DETECTION)
619#define OXR_HAVE_EXT_plane_detection
620#define OXR_EXTENSION_SUPPORT_EXT_plane_detection(_) _(EXT_plane_detection, EXT_PLANE_DETECTION)
621#else
622#define OXR_EXTENSION_SUPPORT_EXT_plane_detection(_)
623#endif
624
625
626/*
627 * XR_MND_headless
628 */
629#if defined(XR_MND_headless) && defined(XRT_FEATURE_OPENXR_HEADLESS)
630#define OXR_HAVE_MND_headless
631#define OXR_EXTENSION_SUPPORT_MND_headless(_) _(MND_headless, MND_HEADLESS)
632#else
633#define OXR_EXTENSION_SUPPORT_MND_headless(_)
634#endif
635
636
637/*
638 * XR_MND_swapchain_usage_input_attachment_bit
639 */
640#if defined(XR_MND_swapchain_usage_input_attachment_bit)
641#define OXR_HAVE_MND_swapchain_usage_input_attachment_bit
642#define OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
643 _(MND_swapchain_usage_input_attachment_bit, MND_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
644#else
645#define OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_)
646#endif
647
648
649/*
650 * XR_MSFT_hand_interaction
651 */
652#if defined(XR_MSFT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND)
653#define OXR_HAVE_MSFT_hand_interaction
654#define OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) _(MSFT_hand_interaction, MSFT_HAND_INTERACTION)
655#else
656#define OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_)
657#endif
658
659
660/*
661 * XR_MSFT_unbounded_reference_space
662 */
663#if defined(XR_MSFT_unbounded_reference_space) && defined(XRT_FEATURE_OPENXR_SPACE_UNBOUNDED)
664#define OXR_HAVE_MSFT_unbounded_reference_space
665#define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \
666 _(MSFT_unbounded_reference_space, MSFT_UNBOUNDED_REFERENCE_SPACE)
667#else
668#define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_)
669#endif
670
671
672/*
673 * XR_OPPO_controller_interaction
674 */
675#if defined(XR_OPPO_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_OPPO)
676#define OXR_HAVE_OPPO_controller_interaction
677#define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) _(OPPO_controller_interaction, OPPO_CONTROLLER_INTERACTION)
678#else
679#define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_)
680#endif
681
682
683/*
684 * XR_EXTX_overlay
685 */
686#if defined(XR_EXTX_overlay) && defined(XRT_FEATURE_OPENXR_OVERLAY)
687#define OXR_HAVE_EXTX_overlay
688#define OXR_EXTENSION_SUPPORT_EXTX_overlay(_) _(EXTX_overlay, EXTX_OVERLAY)
689#else
690#define OXR_EXTENSION_SUPPORT_EXTX_overlay(_)
691#endif
692
693
694/*
695 * XR_HTCX_vive_tracker_interaction
696 */
697#if defined(XR_HTCX_vive_tracker_interaction) && defined(ALWAYS_DISABLED)
698#define OXR_HAVE_HTCX_vive_tracker_interaction
699#define OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \
700 _(HTCX_vive_tracker_interaction, HTCX_VIVE_TRACKER_INTERACTION)
701#else
702#define OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_)
703#endif
704
705
706/*
707 * XR_HTC_vive_cosmos_controller_interaction
708 */
709#if defined(XR_HTC_vive_cosmos_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_VIVE_COSMOS)
710#define OXR_HAVE_HTC_vive_cosmos_controller_interaction
711#define OXR_EXTENSION_SUPPORT_HTC_vive_cosmos_controller_interaction(_) \
712 _(HTC_vive_cosmos_controller_interaction, HTC_VIVE_COSMOS_CONTROLLER_INTERACTION)
713#else
714#define OXR_EXTENSION_SUPPORT_HTC_vive_cosmos_controller_interaction(_)
715#endif
716
717
718/*
719 * XR_HTC_vive_focus3_controller_interaction
720 */
721#if defined(XR_HTC_vive_focus3_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3)
722#define OXR_HAVE_HTC_vive_focus3_controller_interaction
723#define OXR_EXTENSION_SUPPORT_HTC_vive_focus3_controller_interaction(_) \
724 _(HTC_vive_focus3_controller_interaction, HTC_VIVE_FOCUS3_CONTROLLER_INTERACTION)
725#else
726#define OXR_EXTENSION_SUPPORT_HTC_vive_focus3_controller_interaction(_)
727#endif
728
729
730/*
731 * XR_MNDX_ball_on_a_stick_controller
732 */
733#if defined(XR_MNDX_ball_on_a_stick_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
734#define OXR_HAVE_MNDX_ball_on_a_stick_controller
735#define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
736 _(MNDX_ball_on_a_stick_controller, MNDX_BALL_ON_A_STICK_CONTROLLER)
737#else
738#define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_)
739#endif
740
741
742/*
743 * XR_MNDX_egl_enable
744 */
745#if defined(XR_MNDX_egl_enable) && defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL)
746#define OXR_HAVE_MNDX_egl_enable
747#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) _(MNDX_egl_enable, MNDX_EGL_ENABLE)
748#else
749#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
750#endif
751
752
753/*
754 * XR_MNDX_force_feedback_curl
755 */
756#if defined(XR_MNDX_force_feedback_curl) && defined(XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL)
757#define OXR_HAVE_MNDX_force_feedback_curl
758#define OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) _(MNDX_force_feedback_curl, MNDX_FORCE_FEEDBACK_CURL)
759#else
760#define OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_)
761#endif
762
763
764/*
765 * XR_MNDX_hydra
766 */
767#if defined(XR_MNDX_hydra) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
768#define OXR_HAVE_MNDX_hydra
769#define OXR_EXTENSION_SUPPORT_MNDX_hydra(_) _(MNDX_hydra, MNDX_HYDRA)
770#else
771#define OXR_EXTENSION_SUPPORT_MNDX_hydra(_)
772#endif
773
774
775/*
776 * XR_MNDX_system_buttons
777 */
778#if defined(XR_MNDX_system_buttons) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
779#define OXR_HAVE_MNDX_system_buttons
780#define OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_) _(MNDX_system_buttons, MNDX_SYSTEM_BUTTONS)
781#else
782#define OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_)
783#endif
784
785
786/*
787 * XR_MNDX_xdev_space
788 */
789#if defined(XR_MNDX_xdev_space) && defined(XRT_FEATURE_OPENXR_XDEV_SPACE)
790#define OXR_HAVE_MNDX_xdev_space
791#define OXR_EXTENSION_SUPPORT_MNDX_xdev_space(_) _(MNDX_xdev_space, MNDX_XDEV_SPACE)
792#else
793#define OXR_EXTENSION_SUPPORT_MNDX_xdev_space(_)
794#endif
795
796// end of GENERATED per-extension defines - do not modify - used by scripts
797
798/*!
799 * Call this, passing a macro taking two parameters, to
800 * generate tables, code, etc. related to OpenXR extensions.
801 * Upon including invoking OXR_EXTENSION_SUPPORT_GENERATE() with some
802 * MY_HANDLE_EXTENSION(mixed_case, all_caps), MY_HANDLE_EXTENSION will be called
803 * for each extension implemented in Monado and supported in this build:
804 *
805 * - The first parameter is the name of the extension without the leading XR_
806 * prefix: e.g. `KHR_opengl_enable`
807 * - The second parameter is the same text as the first, but in all uppercase,
808 * since this transform cannot be done in the C preprocessor, and some
809 * extension-related entities use this instead of the exact extension name.
810 *
811 * Implementation note: This macro calls another macro for each extension: that
812 * macro is either defined to call your provided macro, or defined to nothing,
813 * depending on if the extension is supported in this build.
814 *
815 * @note Do not edit anything between `clang-format off` and `clang-format on` -
816 * it will be replaced next time this file is generated!
817 */
818// clang-format off
819#define OXR_EXTENSION_SUPPORT_GENERATE(_) \
820 OXR_EXTENSION_SUPPORT_KHR_android_create_instance(_) \
821 OXR_EXTENSION_SUPPORT_KHR_android_thread_settings(_) \
822 OXR_EXTENSION_SUPPORT_KHR_binding_modification(_) \
823 OXR_EXTENSION_SUPPORT_KHR_composition_layer_color_scale_bias(_) \
824 OXR_EXTENSION_SUPPORT_KHR_composition_layer_cube(_) \
825 OXR_EXTENSION_SUPPORT_KHR_composition_layer_cylinder(_) \
826 OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) \
827 OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \
828 OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) \
829 OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) \
830 OXR_EXTENSION_SUPPORT_KHR_D3D11_enable(_) \
831 OXR_EXTENSION_SUPPORT_KHR_D3D12_enable(_) \
832 OXR_EXTENSION_SUPPORT_KHR_extended_struct_name_lengths(_) \
833 OXR_EXTENSION_SUPPORT_KHR_loader_init(_) \
834 OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) \
835 OXR_EXTENSION_SUPPORT_KHR_locate_spaces(_) \
836 OXR_EXTENSION_SUPPORT_KHR_maintenance1(_) \
837 OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) \
838 OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) \
839 OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
840 OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_) \
841 OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) \
842 OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) \
843 OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_) \
844 OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_) \
845 OXR_EXTENSION_SUPPORT_EXT_active_action_set_priority(_) \
846 OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) \
847 OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_) \
848 OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_) \
849 OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_) \
850 OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) \
851 OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_) \
852 OXR_EXTENSION_SUPPORT_EXT_local_floor(_) \
853 OXR_EXTENSION_SUPPORT_EXT_palm_pose(_) \
854 OXR_EXTENSION_SUPPORT_EXT_performance_settings(_) \
855 OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_) \
856 OXR_EXTENSION_SUPPORT_BD_controller_interaction(_) \
857 OXR_EXTENSION_SUPPORT_FB_body_tracking(_) \
858 OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_) \
859 OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_) \
860 OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_) \
861 OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_) \
862 OXR_EXTENSION_SUPPORT_FB_face_tracking2(_) \
863 OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) \
864 OXR_EXTENSION_SUPPORT_FB_haptic_pcm(_) \
865 OXR_EXTENSION_SUPPORT_FB_passthrough(_) \
866 OXR_EXTENSION_SUPPORT_FB_touch_controller_pro(_) \
867 OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_) \
868 OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_) \
869 OXR_EXTENSION_SUPPORT_META_body_tracking_full_body(_) \
870 OXR_EXTENSION_SUPPORT_META_touch_controller_plus(_) \
871 OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
872 OXR_EXTENSION_SUPPORT_EXT_plane_detection(_) \
873 OXR_EXTENSION_SUPPORT_MND_headless(_) \
874 OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
875 OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) \
876 OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \
877 OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) \
878 OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \
879 OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \
880 OXR_EXTENSION_SUPPORT_HTC_vive_cosmos_controller_interaction(_) \
881 OXR_EXTENSION_SUPPORT_HTC_vive_focus3_controller_interaction(_) \
882 OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
883 OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \
884 OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) \
885 OXR_EXTENSION_SUPPORT_MNDX_hydra(_) \
886 OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_) \
887 OXR_EXTENSION_SUPPORT_MNDX_xdev_space(_)
888// clang-format on
Include all of the openxr headers in one place.