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_loader_init
162 */
163#if defined(XR_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
164#define OXR_HAVE_KHR_loader_init
165#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_) _(KHR_loader_init, KHR_LOADER_INIT)
166#else
167#define OXR_EXTENSION_SUPPORT_KHR_loader_init(_)
168#endif
169
170
171/*
172 * XR_KHR_loader_init_android
173 */
174#if defined(XR_KHR_loader_init_android) && defined(OXR_HAVE_KHR_loader_init) && defined(XR_USE_PLATFORM_ANDROID)
175#define OXR_HAVE_KHR_loader_init_android
176#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) _(KHR_loader_init_android, KHR_LOADER_INIT_ANDROID)
177#else
178#define OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_)
179#endif
180
181
182/*
183 * XR_KHR_locate_spaces
184 */
185#if defined(XR_KHR_locate_spaces)
186#define OXR_HAVE_KHR_locate_spaces
187#define OXR_EXTENSION_SUPPORT_KHR_locate_spaces(_) _(KHR_locate_spaces, KHR_LOCATE_SPACES)
188#else
189#define OXR_EXTENSION_SUPPORT_KHR_locate_spaces(_)
190#endif
191
192
193/*
194 * XR_KHR_maintenance1
195 */
196#if defined(XR_KHR_maintenance1)
197#define OXR_HAVE_KHR_maintenance1
198#define OXR_EXTENSION_SUPPORT_KHR_maintenance1(_) _(KHR_maintenance1, KHR_MAINTENANCE1)
199#else
200#define OXR_EXTENSION_SUPPORT_KHR_maintenance1(_)
201#endif
202
203
204/*
205 * XR_KHR_opengl_enable
206 */
207#if defined(XR_KHR_opengl_enable) && defined(XR_USE_GRAPHICS_API_OPENGL)
208#define OXR_HAVE_KHR_opengl_enable
209#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) _(KHR_opengl_enable, KHR_OPENGL_ENABLE)
210#else
211#define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_)
212#endif
213
214
215/*
216 * XR_KHR_opengl_es_enable
217 */
218#if defined(XR_KHR_opengl_es_enable) && defined(XR_USE_GRAPHICS_API_OPENGL_ES)
219#define OXR_HAVE_KHR_opengl_es_enable
220#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) _(KHR_opengl_es_enable, KHR_OPENGL_ES_ENABLE)
221#else
222#define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_)
223#endif
224
225
226/*
227 * XR_KHR_swapchain_usage_input_attachment_bit
228 */
229#if defined(XR_KHR_swapchain_usage_input_attachment_bit)
230#define OXR_HAVE_KHR_swapchain_usage_input_attachment_bit
231#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
232 _(KHR_swapchain_usage_input_attachment_bit, KHR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
233#else
234#define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_)
235#endif
236
237
238/*
239 * XR_KHR_visibility_mask
240 */
241#if defined(XR_KHR_visibility_mask) && defined(XRT_FEATURE_OPENXR_VISIBILITY_MASK)
242#define OXR_HAVE_KHR_visibility_mask
243#define OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_) _(KHR_visibility_mask, KHR_VISIBILITY_MASK)
244#else
245#define OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_)
246#endif
247
248
249/*
250 * XR_KHR_vulkan_enable
251 */
252#if defined(XR_KHR_vulkan_enable) && defined(XR_USE_GRAPHICS_API_VULKAN)
253#define OXR_HAVE_KHR_vulkan_enable
254#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) _(KHR_vulkan_enable, KHR_VULKAN_ENABLE)
255#else
256#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_)
257#endif
258
259
260/*
261 * XR_KHR_vulkan_enable2
262 */
263#if defined(XR_KHR_vulkan_enable2) && defined(XR_USE_GRAPHICS_API_VULKAN)
264#define OXR_HAVE_KHR_vulkan_enable2
265#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) _(KHR_vulkan_enable2, KHR_VULKAN_ENABLE2)
266#else
267#define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_)
268#endif
269
270
271/*
272 * XR_KHR_vulkan_swapchain_format_list
273 */
274#if defined(XR_KHR_vulkan_swapchain_format_list) && defined(XR_USE_GRAPHICS_API_VULKAN) && \
275 defined(XRT_FEATURE_OPENXR_VULKAN_SWAPCHAIN_FORMAT_LIST)
276#define OXR_HAVE_KHR_vulkan_swapchain_format_list
277#define OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_) \
278 _(KHR_vulkan_swapchain_format_list, KHR_VULKAN_SWAPCHAIN_FORMAT_LIST)
279#else
280#define OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_)
281#endif
282
283
284/*
285 * XR_KHR_win32_convert_performance_counter_time
286 */
287#if defined(XR_KHR_win32_convert_performance_counter_time) && defined(XR_USE_PLATFORM_WIN32)
288#define OXR_HAVE_KHR_win32_convert_performance_counter_time
289#define OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_) \
290 _(KHR_win32_convert_performance_counter_time, KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME)
291#else
292#define OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_)
293#endif
294
295
296/*
297 * XR_EXT_debug_utils
298 */
299#if defined(XR_EXT_debug_utils) && defined(XRT_FEATURE_OPENXR_DEBUG_UTILS)
300#define OXR_HAVE_EXT_debug_utils
301#define OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) _(EXT_debug_utils, EXT_DEBUG_UTILS)
302#else
303#define OXR_EXTENSION_SUPPORT_EXT_debug_utils(_)
304#endif
305
306
307/*
308 * XR_EXT_dpad_binding
309 */
310#if defined(XR_EXT_dpad_binding)
311#define OXR_HAVE_EXT_dpad_binding
312#define OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_) _(EXT_dpad_binding, EXT_DPAD_BINDING)
313#else
314#define OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_)
315#endif
316
317
318/*
319 * XR_EXT_eye_gaze_interaction
320 */
321#if defined(XR_EXT_eye_gaze_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE)
322#define OXR_HAVE_EXT_eye_gaze_interaction
323#define OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_) _(EXT_eye_gaze_interaction, EXT_EYE_GAZE_INTERACTION)
324#else
325#define OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_)
326#endif
327
328
329/*
330 * XR_EXT_hand_interaction
331 */
332#if defined(XR_EXT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND)
333#define OXR_HAVE_EXT_hand_interaction
334#define OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_) _(EXT_hand_interaction, EXT_HAND_INTERACTION)
335#else
336#define OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_)
337#endif
338
339
340/*
341 * XR_EXT_hand_tracking
342 */
343#if defined(XR_EXT_hand_tracking) && defined(XRT_FEATURE_OPENXR_HAND_TRACKING_EXT)
344#define OXR_HAVE_EXT_hand_tracking
345#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) _(EXT_hand_tracking, EXT_HAND_TRACKING)
346#else
347#define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_)
348#endif
349
350
351/*
352 * XR_EXT_hp_mixed_reality_controller
353 */
354#if defined(XR_EXT_hp_mixed_reality_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
355#define OXR_HAVE_EXT_hp_mixed_reality_controller
356#define OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_) \
357 _(EXT_hp_mixed_reality_controller, EXT_HP_MIXED_REALITY_CONTROLLER)
358#else
359#define OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_)
360#endif
361
362
363/*
364 * XR_EXT_local_floor
365 */
366#if defined(XR_EXT_local_floor) && defined(XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR)
367#define OXR_HAVE_EXT_local_floor
368#define OXR_EXTENSION_SUPPORT_EXT_local_floor(_) _(EXT_local_floor, EXT_LOCAL_FLOOR)
369#else
370#define OXR_EXTENSION_SUPPORT_EXT_local_floor(_)
371#endif
372
373
374/*
375 * XR_EXT_palm_pose
376 */
377#if defined(XR_EXT_palm_pose) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE)
378#define OXR_HAVE_EXT_palm_pose
379#define OXR_EXTENSION_SUPPORT_EXT_palm_pose(_) _(EXT_palm_pose, EXT_PALM_POSE)
380#else
381#define OXR_EXTENSION_SUPPORT_EXT_palm_pose(_)
382#endif
383
384
385/*
386 * XR_EXT_performance_settings
387 */
388#if defined(XR_EXT_performance_settings) && defined(XRT_FEATURE_OPENXR_PERFORMANCE_SETTINGS)
389#define OXR_HAVE_EXT_performance_settings
390#define OXR_EXTENSION_SUPPORT_EXT_performance_settings(_) _(EXT_performance_settings, EXT_PERFORMANCE_SETTINGS)
391#else
392#define OXR_EXTENSION_SUPPORT_EXT_performance_settings(_)
393#endif
394
395
396/*
397 * XR_EXT_samsung_odyssey_controller
398 */
399#if defined(XR_EXT_samsung_odyssey_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
400#define OXR_HAVE_EXT_samsung_odyssey_controller
401#define OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_) \
402 _(EXT_samsung_odyssey_controller, EXT_SAMSUNG_ODYSSEY_CONTROLLER)
403#else
404#define OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_)
405#endif
406
407
408/*
409 * XR_BD_controller_interaction
410 */
411#if defined(XR_BD_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_BYTEDANCE)
412#define OXR_HAVE_BD_controller_interaction
413#define OXR_EXTENSION_SUPPORT_BD_controller_interaction(_) _(BD_controller_interaction, BD_CONTROLLER_INTERACTION)
414#else
415#define OXR_EXTENSION_SUPPORT_BD_controller_interaction(_)
416#endif
417
418
419/*
420 * XR_FB_body_tracking
421 */
422#if defined(XR_FB_body_tracking) && defined(XRT_FEATURE_OPENXR_BODY_TRACKING_FB)
423#define OXR_HAVE_FB_body_tracking
424#define OXR_EXTENSION_SUPPORT_FB_body_tracking(_) _(FB_body_tracking, FB_BODY_TRACKING)
425#else
426#define OXR_EXTENSION_SUPPORT_FB_body_tracking(_)
427#endif
428
429
430/*
431 * XR_FB_composition_layer_alpha_blend
432 */
433#if defined(XR_FB_composition_layer_alpha_blend) && defined(XRT_FEATURE_OPENXR_LAYER_FB_ALPHA_BLEND)
434#define OXR_HAVE_FB_composition_layer_alpha_blend
435#define OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_) \
436 _(FB_composition_layer_alpha_blend, FB_COMPOSITION_LAYER_ALPHA_BLEND)
437#else
438#define OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_)
439#endif
440
441
442/*
443 * XR_FB_composition_layer_image_layout
444 */
445#if defined(XR_FB_composition_layer_image_layout) && defined(XRT_FEATURE_OPENXR_LAYER_FB_IMAGE_LAYOUT)
446#define OXR_HAVE_FB_composition_layer_image_layout
447#define OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_) \
448 _(FB_composition_layer_image_layout, FB_COMPOSITION_LAYER_IMAGE_LAYOUT)
449#else
450#define OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_)
451#endif
452
453
454/*
455 * XR_FB_composition_layer_settings
456 */
457#if defined(XR_FB_composition_layer_settings) && defined(XRT_FEATURE_OPENXR_LAYER_FB_SETTINGS)
458#define OXR_HAVE_FB_composition_layer_settings
459#define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_) \
460 _(FB_composition_layer_settings, FB_COMPOSITION_LAYER_SETTINGS)
461#else
462#define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_)
463#endif
464
465
466/*
467 * XR_FB_composition_layer_depth_test
468 */
469#if defined(XR_FB_composition_layer_depth_test) && defined(XRT_FEATURE_OPENXR_LAYER_FB_DEPTH_TEST)
470#define OXR_HAVE_FB_composition_layer_depth_test
471#define OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_) \
472 _(FB_composition_layer_depth_test, FB_COMPOSITION_LAYER_DEPTH_TEST)
473#else
474#define OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_)
475#endif
476
477
478/*
479 * XR_FB_face_tracking2
480 */
481#if defined(XR_FB_face_tracking2) && defined(XRT_FEATURE_OPENXR_FACE_TRACKING2_FB)
482#define OXR_HAVE_FB_face_tracking2
483#define OXR_EXTENSION_SUPPORT_FB_face_tracking2(_) _(FB_face_tracking2, FB_FACE_TRACKING2)
484#else
485#define OXR_EXTENSION_SUPPORT_FB_face_tracking2(_)
486#endif
487
488
489/*
490 * XR_FB_display_refresh_rate
491 */
492#if defined(XR_FB_display_refresh_rate) && defined(XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE)
493#define OXR_HAVE_FB_display_refresh_rate
494#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) _(FB_display_refresh_rate, FB_DISPLAY_REFRESH_RATE)
495#else
496#define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_)
497#endif
498
499
500/*
501 * XR_FB_passthrough
502 */
503#if defined(XR_FB_passthrough) && defined(XRT_FEATURE_OPENXR_LAYER_FB_PASSTHROUGH)
504#define OXR_HAVE_FB_passthrough
505#define OXR_EXTENSION_SUPPORT_FB_passthrough(_) _(FB_passthrough, FB_PASSTHROUGH)
506#else
507#define OXR_EXTENSION_SUPPORT_FB_passthrough(_)
508#endif
509
510
511/*
512 * XR_FB_touch_controller_pro
513 */
514#if defined(XR_FB_touch_controller_pro) && defined(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PRO)
515#define OXR_HAVE_FB_touch_controller_pro
516#define OXR_EXTENSION_SUPPORT_FB_touch_controller_pro(_) _(FB_touch_controller_pro, FB_TOUCH_CONTROLLER_PRO)
517#else
518#define OXR_EXTENSION_SUPPORT_FB_touch_controller_pro(_)
519#endif
520
521
522/*
523 * XR_FB_touch_controller_proximity
524 */
525#if defined(XR_FB_touch_controller_proximity) && defined(XRT_FEATURE_OPENXR_INTERACTION_FB_PROXIMITY)
526#define OXR_HAVE_FB_touch_controller_proximity
527#define OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_) \
528 _(FB_touch_controller_proximity, FB_TOUCH_CONTROLLER_PROXIMITY)
529#else
530#define OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_)
531#endif
532
533
534/*
535 * XR_HTC_facial_tracking
536 */
537#if defined(XR_HTC_facial_tracking) && defined(XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC)
538#define OXR_HAVE_HTC_facial_tracking
539#define OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_) _(HTC_facial_tracking, HTC_FACIAL_TRACKING)
540#else
541#define OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_)
542#endif
543
544
545/*
546 * XR_META_touch_controller_plus
547 */
548#if defined(XR_META_touch_controller_plus) && defined(XRT_FEATURE_OPENXR_INTERACTION_TOUCH_PLUS)
549#define OXR_HAVE_META_touch_controller_plus
550#define OXR_EXTENSION_SUPPORT_META_touch_controller_plus(_) _(META_touch_controller_plus, META_TOUCH_CONTROLLER_PLUS)
551#else
552#define OXR_EXTENSION_SUPPORT_META_touch_controller_plus(_)
553#endif
554
555
556/*
557 * XR_ML_ml2_controller_interaction
558 */
559#if defined(XR_ML_ml2_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_ML2)
560#define OXR_HAVE_ML_ml2_controller_interaction
561#define OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
562 _(ML_ml2_controller_interaction, ML_ML2_CONTROLLER_INTERACTION)
563#else
564#define OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_)
565#endif
566
567
568/*
569 * XR_MND_headless
570 */
571#if defined(XR_MND_headless) && defined(XRT_FEATURE_OPENXR_HEADLESS)
572#define OXR_HAVE_MND_headless
573#define OXR_EXTENSION_SUPPORT_MND_headless(_) _(MND_headless, MND_HEADLESS)
574#else
575#define OXR_EXTENSION_SUPPORT_MND_headless(_)
576#endif
577
578
579/*
580 * XR_MND_swapchain_usage_input_attachment_bit
581 */
582#if defined(XR_MND_swapchain_usage_input_attachment_bit)
583#define OXR_HAVE_MND_swapchain_usage_input_attachment_bit
584#define OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
585 _(MND_swapchain_usage_input_attachment_bit, MND_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
586#else
587#define OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_)
588#endif
589
590
591/*
592 * XR_MSFT_hand_interaction
593 */
594#if defined(XR_MSFT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND)
595#define OXR_HAVE_MSFT_hand_interaction
596#define OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) _(MSFT_hand_interaction, MSFT_HAND_INTERACTION)
597#else
598#define OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_)
599#endif
600
601
602/*
603 * XR_MSFT_unbounded_reference_space
604 */
605#if defined(XR_MSFT_unbounded_reference_space) && defined(XRT_FEATURE_OPENXR_SPACE_UNBOUNDED)
606#define OXR_HAVE_MSFT_unbounded_reference_space
607#define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \
608 _(MSFT_unbounded_reference_space, MSFT_UNBOUNDED_REFERENCE_SPACE)
609#else
610#define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_)
611#endif
612
613
614/*
615 * XR_OPPO_controller_interaction
616 */
617#if defined(XR_OPPO_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_OPPO)
618#define OXR_HAVE_OPPO_controller_interaction
619#define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) _(OPPO_controller_interaction, OPPO_CONTROLLER_INTERACTION)
620#else
621#define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_)
622#endif
623
624
625/*
626 * XR_EXTX_overlay
627 */
628#if defined(XR_EXTX_overlay) && defined(XRT_FEATURE_OPENXR_OVERLAY)
629#define OXR_HAVE_EXTX_overlay
630#define OXR_EXTENSION_SUPPORT_EXTX_overlay(_) _(EXTX_overlay, EXTX_OVERLAY)
631#else
632#define OXR_EXTENSION_SUPPORT_EXTX_overlay(_)
633#endif
634
635
636/*
637 * XR_HTCX_vive_tracker_interaction
638 */
639#if defined(XR_HTCX_vive_tracker_interaction) && defined(ALWAYS_DISABLED)
640#define OXR_HAVE_HTCX_vive_tracker_interaction
641#define OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \
642 _(HTCX_vive_tracker_interaction, HTCX_VIVE_TRACKER_INTERACTION)
643#else
644#define OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_)
645#endif
646
647
648/*
649 * XR_HTC_vive_cosmos_controller_interaction
650 */
651#if defined(XR_HTC_vive_cosmos_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_VIVE_COSMOS)
652#define OXR_HAVE_HTC_vive_cosmos_controller_interaction
653#define OXR_EXTENSION_SUPPORT_HTC_vive_cosmos_controller_interaction(_) \
654 _(HTC_vive_cosmos_controller_interaction, HTC_VIVE_COSMOS_CONTROLLER_INTERACTION)
655#else
656#define OXR_EXTENSION_SUPPORT_HTC_vive_cosmos_controller_interaction(_)
657#endif
658
659
660/*
661 * XR_HTC_vive_focus3_controller_interaction
662 */
663#if defined(XR_HTC_vive_focus3_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_VIVE_FOCUS3)
664#define OXR_HAVE_HTC_vive_focus3_controller_interaction
665#define OXR_EXTENSION_SUPPORT_HTC_vive_focus3_controller_interaction(_) \
666 _(HTC_vive_focus3_controller_interaction, HTC_VIVE_FOCUS3_CONTROLLER_INTERACTION)
667#else
668#define OXR_EXTENSION_SUPPORT_HTC_vive_focus3_controller_interaction(_)
669#endif
670
671
672/*
673 * XR_MNDX_ball_on_a_stick_controller
674 */
675#if defined(XR_MNDX_ball_on_a_stick_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
676#define OXR_HAVE_MNDX_ball_on_a_stick_controller
677#define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
678 _(MNDX_ball_on_a_stick_controller, MNDX_BALL_ON_A_STICK_CONTROLLER)
679#else
680#define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_)
681#endif
682
683
684/*
685 * XR_MNDX_egl_enable
686 */
687#if defined(XR_MNDX_egl_enable) && defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL)
688#define OXR_HAVE_MNDX_egl_enable
689#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) _(MNDX_egl_enable, MNDX_EGL_ENABLE)
690#else
691#define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
692#endif
693
694
695/*
696 * XR_MNDX_force_feedback_curl
697 */
698#if defined(XR_MNDX_force_feedback_curl) && defined(XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL)
699#define OXR_HAVE_MNDX_force_feedback_curl
700#define OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) _(MNDX_force_feedback_curl, MNDX_FORCE_FEEDBACK_CURL)
701#else
702#define OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_)
703#endif
704
705
706/*
707 * XR_MNDX_hydra
708 */
709#if defined(XR_MNDX_hydra) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
710#define OXR_HAVE_MNDX_hydra
711#define OXR_EXTENSION_SUPPORT_MNDX_hydra(_) _(MNDX_hydra, MNDX_HYDRA)
712#else
713#define OXR_EXTENSION_SUPPORT_MNDX_hydra(_)
714#endif
715
716
717/*
718 * XR_MNDX_system_buttons
719 */
720#if defined(XR_MNDX_system_buttons) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
721#define OXR_HAVE_MNDX_system_buttons
722#define OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_) _(MNDX_system_buttons, MNDX_SYSTEM_BUTTONS)
723#else
724#define OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_)
725#endif
726
727
728/*
729 * XR_MNDX_xdev_space
730 */
731#if defined(XR_MNDX_xdev_space) && defined(XRT_FEATURE_OPENXR_XDEV_SPACE)
732#define OXR_HAVE_MNDX_xdev_space
733#define OXR_EXTENSION_SUPPORT_MNDX_xdev_space(_) _(MNDX_xdev_space, MNDX_XDEV_SPACE)
734#else
735#define OXR_EXTENSION_SUPPORT_MNDX_xdev_space(_)
736#endif
737
738// end of GENERATED per-extension defines - do not modify - used by scripts
739
740/*!
741 * Call this, passing a macro taking two parameters, to
742 * generate tables, code, etc. related to OpenXR extensions.
743 * Upon including invoking OXR_EXTENSION_SUPPORT_GENERATE() with some
744 * MY_HANDLE_EXTENSION(mixed_case, all_caps), MY_HANDLE_EXTENSION will be called
745 * for each extension implemented in Monado and supported in this build:
746 *
747 * - The first parameter is the name of the extension without the leading XR_
748 * prefix: e.g. `KHR_opengl_enable`
749 * - The second parameter is the same text as the first, but in all uppercase,
750 * since this transform cannot be done in the C preprocessor, and some
751 * extension-related entities use this instead of the exact extension name.
752 *
753 * Implementation note: This macro calls another macro for each extension: that
754 * macro is either defined to call your provided macro, or defined to nothing,
755 * depending on if the extension is supported in this build.
756 *
757 * @note Do not edit anything between `clang-format off` and `clang-format on` -
758 * it will be replaced next time this file is generated!
759 */
760// clang-format off
761#define OXR_EXTENSION_SUPPORT_GENERATE(_) \
762 OXR_EXTENSION_SUPPORT_KHR_android_create_instance(_) \
763 OXR_EXTENSION_SUPPORT_KHR_android_thread_settings(_) \
764 OXR_EXTENSION_SUPPORT_KHR_binding_modification(_) \
765 OXR_EXTENSION_SUPPORT_KHR_composition_layer_color_scale_bias(_) \
766 OXR_EXTENSION_SUPPORT_KHR_composition_layer_cube(_) \
767 OXR_EXTENSION_SUPPORT_KHR_composition_layer_cylinder(_) \
768 OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) \
769 OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \
770 OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) \
771 OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) \
772 OXR_EXTENSION_SUPPORT_KHR_D3D11_enable(_) \
773 OXR_EXTENSION_SUPPORT_KHR_D3D12_enable(_) \
774 OXR_EXTENSION_SUPPORT_KHR_loader_init(_) \
775 OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) \
776 OXR_EXTENSION_SUPPORT_KHR_locate_spaces(_) \
777 OXR_EXTENSION_SUPPORT_KHR_maintenance1(_) \
778 OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) \
779 OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) \
780 OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
781 OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_) \
782 OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) \
783 OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) \
784 OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_) \
785 OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_) \
786 OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) \
787 OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_) \
788 OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_) \
789 OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_) \
790 OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) \
791 OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_) \
792 OXR_EXTENSION_SUPPORT_EXT_local_floor(_) \
793 OXR_EXTENSION_SUPPORT_EXT_palm_pose(_) \
794 OXR_EXTENSION_SUPPORT_EXT_performance_settings(_) \
795 OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_) \
796 OXR_EXTENSION_SUPPORT_BD_controller_interaction(_) \
797 OXR_EXTENSION_SUPPORT_FB_body_tracking(_) \
798 OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_) \
799 OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_) \
800 OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_) \
801 OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_) \
802 OXR_EXTENSION_SUPPORT_FB_face_tracking2(_) \
803 OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) \
804 OXR_EXTENSION_SUPPORT_FB_passthrough(_) \
805 OXR_EXTENSION_SUPPORT_FB_touch_controller_pro(_) \
806 OXR_EXTENSION_SUPPORT_FB_touch_controller_proximity(_) \
807 OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_) \
808 OXR_EXTENSION_SUPPORT_META_touch_controller_plus(_) \
809 OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
810 OXR_EXTENSION_SUPPORT_MND_headless(_) \
811 OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
812 OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) \
813 OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \
814 OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) \
815 OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \
816 OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \
817 OXR_EXTENSION_SUPPORT_HTC_vive_cosmos_controller_interaction(_) \
818 OXR_EXTENSION_SUPPORT_HTC_vive_focus3_controller_interaction(_) \
819 OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
820 OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \
821 OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) \
822 OXR_EXTENSION_SUPPORT_MNDX_hydra(_) \
823 OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_) \
824 OXR_EXTENSION_SUPPORT_MNDX_xdev_space(_)
825// clang-format on
Include all of the openxr headers in one place.