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_opengl_enable
184  */
185 #if defined(XR_KHR_opengl_enable) && defined(XR_USE_GRAPHICS_API_OPENGL)
186 #define OXR_HAVE_KHR_opengl_enable
187 #define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) _(KHR_opengl_enable, KHR_OPENGL_ENABLE)
188 #else
189 #define OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_)
190 #endif
191 
192 
193 /*
194  * XR_KHR_opengl_es_enable
195  */
196 #if defined(XR_KHR_opengl_es_enable) && defined(XR_USE_GRAPHICS_API_OPENGL_ES)
197 #define OXR_HAVE_KHR_opengl_es_enable
198 #define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) _(KHR_opengl_es_enable, KHR_OPENGL_ES_ENABLE)
199 #else
200 #define OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_)
201 #endif
202 
203 
204 /*
205  * XR_KHR_swapchain_usage_input_attachment_bit
206  */
207 #if defined(XR_KHR_swapchain_usage_input_attachment_bit)
208 #define OXR_HAVE_KHR_swapchain_usage_input_attachment_bit
209 #define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
210  _(KHR_swapchain_usage_input_attachment_bit, KHR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
211 #else
212 #define OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_)
213 #endif
214 
215 
216 /*
217  * XR_KHR_visibility_mask
218  */
219 #if defined(XR_KHR_visibility_mask) && defined(XRT_FEATURE_OPENXR_VISIBILITY_MASK)
220 #define OXR_HAVE_KHR_visibility_mask
221 #define OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_) _(KHR_visibility_mask, KHR_VISIBILITY_MASK)
222 #else
223 #define OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_)
224 #endif
225 
226 
227 /*
228  * XR_KHR_vulkan_enable
229  */
230 #if defined(XR_KHR_vulkan_enable) && defined(XR_USE_GRAPHICS_API_VULKAN)
231 #define OXR_HAVE_KHR_vulkan_enable
232 #define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) _(KHR_vulkan_enable, KHR_VULKAN_ENABLE)
233 #else
234 #define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_)
235 #endif
236 
237 
238 /*
239  * XR_KHR_vulkan_enable2
240  */
241 #if defined(XR_KHR_vulkan_enable2) && defined(XR_USE_GRAPHICS_API_VULKAN)
242 #define OXR_HAVE_KHR_vulkan_enable2
243 #define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) _(KHR_vulkan_enable2, KHR_VULKAN_ENABLE2)
244 #else
245 #define OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_)
246 #endif
247 
248 
249 /*
250  * XR_KHR_vulkan_swapchain_format_list
251  */
252 #if defined(XR_KHR_vulkan_swapchain_format_list) && defined(XR_USE_GRAPHICS_API_VULKAN) && \
253  defined(XRT_FEATURE_OPENXR_VULKAN_SWAPCHAIN_FORMAT_LIST)
254 #define OXR_HAVE_KHR_vulkan_swapchain_format_list
255 #define OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_) \
256  _(KHR_vulkan_swapchain_format_list, KHR_VULKAN_SWAPCHAIN_FORMAT_LIST)
257 #else
258 #define OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_)
259 #endif
260 
261 
262 /*
263  * XR_KHR_win32_convert_performance_counter_time
264  */
265 #if defined(XR_KHR_win32_convert_performance_counter_time) && defined(XR_USE_PLATFORM_WIN32)
266 #define OXR_HAVE_KHR_win32_convert_performance_counter_time
267 #define OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_) \
268  _(KHR_win32_convert_performance_counter_time, KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME)
269 #else
270 #define OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_)
271 #endif
272 
273 
274 /*
275  * XR_EXT_debug_utils
276  */
277 #if defined(XR_EXT_debug_utils) && defined(XRT_FEATURE_OPENXR_DEBUG_UTILS)
278 #define OXR_HAVE_EXT_debug_utils
279 #define OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) _(EXT_debug_utils, EXT_DEBUG_UTILS)
280 #else
281 #define OXR_EXTENSION_SUPPORT_EXT_debug_utils(_)
282 #endif
283 
284 
285 /*
286  * XR_EXT_dpad_binding
287  */
288 #if defined(XR_EXT_dpad_binding)
289 #define OXR_HAVE_EXT_dpad_binding
290 #define OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_) _(EXT_dpad_binding, EXT_DPAD_BINDING)
291 #else
292 #define OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_)
293 #endif
294 
295 
296 /*
297  * XR_EXT_eye_gaze_interaction
298  */
299 #if defined(XR_EXT_eye_gaze_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_EYE_GAZE)
300 #define OXR_HAVE_EXT_eye_gaze_interaction
301 #define OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_) _(EXT_eye_gaze_interaction, EXT_EYE_GAZE_INTERACTION)
302 #else
303 #define OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_)
304 #endif
305 
306 
307 /*
308  * XR_EXT_hand_interaction
309  */
310 #if defined(XR_EXT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_HAND)
311 #define OXR_HAVE_EXT_hand_interaction
312 #define OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_) _(EXT_hand_interaction, EXT_HAND_INTERACTION)
313 #else
314 #define OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_)
315 #endif
316 
317 
318 /*
319  * XR_EXT_hand_tracking
320  */
321 #if defined(XR_EXT_hand_tracking)
322 #define OXR_HAVE_EXT_hand_tracking
323 #define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) _(EXT_hand_tracking, EXT_HAND_TRACKING)
324 #else
325 #define OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_)
326 #endif
327 
328 
329 /*
330  * XR_EXT_hp_mixed_reality_controller
331  */
332 #if defined(XR_EXT_hp_mixed_reality_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
333 #define OXR_HAVE_EXT_hp_mixed_reality_controller
334 #define OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_) \
335  _(EXT_hp_mixed_reality_controller, EXT_HP_MIXED_REALITY_CONTROLLER)
336 #else
337 #define OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_)
338 #endif
339 
340 
341 /*
342  * XR_EXT_local_floor
343  */
344 #if defined(XR_EXT_local_floor) && defined(XRT_FEATURE_OPENXR_SPACE_LOCAL_FLOOR)
345 #define OXR_HAVE_EXT_local_floor
346 #define OXR_EXTENSION_SUPPORT_EXT_local_floor(_) _(EXT_local_floor, EXT_LOCAL_FLOOR)
347 #else
348 #define OXR_EXTENSION_SUPPORT_EXT_local_floor(_)
349 #endif
350 
351 
352 /*
353  * XR_EXT_palm_pose
354  */
355 #if defined(XR_EXT_palm_pose) && defined(XRT_FEATURE_OPENXR_INTERACTION_EXT_PALM_POSE)
356 #define OXR_HAVE_EXT_palm_pose
357 #define OXR_EXTENSION_SUPPORT_EXT_palm_pose(_) _(EXT_palm_pose, EXT_PALM_POSE)
358 #else
359 #define OXR_EXTENSION_SUPPORT_EXT_palm_pose(_)
360 #endif
361 
362 
363 /*
364  * XR_EXT_performance_settings
365  */
366 #if defined(XR_EXT_performance_settings) && defined(XRT_FEATURE_OPENXR_PERFORMANCE_SETTINGS)
367 #define OXR_HAVE_EXT_performance_settings
368 #define OXR_EXTENSION_SUPPORT_EXT_performance_settings(_) _(EXT_performance_settings, EXT_PERFORMANCE_SETTINGS)
369 #else
370 #define OXR_EXTENSION_SUPPORT_EXT_performance_settings(_)
371 #endif
372 
373 
374 /*
375  * XR_EXT_samsung_odyssey_controller
376  */
377 #if defined(XR_EXT_samsung_odyssey_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_WINMR)
378 #define OXR_HAVE_EXT_samsung_odyssey_controller
379 #define OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_) \
380  _(EXT_samsung_odyssey_controller, EXT_SAMSUNG_ODYSSEY_CONTROLLER)
381 #else
382 #define OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_)
383 #endif
384 
385 
386 /*
387  * XR_FB_composition_layer_alpha_blend
388  */
389 #if defined(XR_FB_composition_layer_alpha_blend) && defined(XRT_FEATURE_OPENXR_LAYER_FB_ALPHA_BLEND)
390 #define OXR_HAVE_FB_composition_layer_alpha_blend
391 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_) \
392  _(FB_composition_layer_alpha_blend, FB_COMPOSITION_LAYER_ALPHA_BLEND)
393 #else
394 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_)
395 #endif
396 
397 
398 /*
399  * XR_FB_composition_layer_image_layout
400  */
401 #if defined(XR_FB_composition_layer_image_layout) && defined(XRT_FEATURE_OPENXR_LAYER_FB_IMAGE_LAYOUT)
402 #define OXR_HAVE_FB_composition_layer_image_layout
403 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_) \
404  _(FB_composition_layer_image_layout, FB_COMPOSITION_LAYER_IMAGE_LAYOUT)
405 #else
406 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_)
407 #endif
408 
409 
410 /*
411  * XR_FB_composition_layer_settings
412  */
413 #if defined(XR_FB_composition_layer_settings) && defined(XRT_FEATURE_OPENXR_LAYER_FB_SETTINGS)
414 #define OXR_HAVE_FB_composition_layer_settings
415 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_) \
416  _(FB_composition_layer_settings, FB_COMPOSITION_LAYER_SETTINGS)
417 #else
418 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_)
419 #endif
420 
421 /*
422  * XR_FB_composition_layer_depth_test
423  */
424 #if defined(XR_FB_composition_layer_depth_test) && defined(XRT_FEATURE_OPENXR_LAYER_FB_DEPTH_TEST)
425 #define OXR_HAVE_FB_composition_layer_depth_test
426 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_) \
427  _(FB_composition_layer_depth_test, FB_COMPOSITION_LAYER_DEPTH_TEST)
428 #else
429 #define OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_)
430 #endif
431 
432 /*
433  * XR_FB_display_refresh_rate
434  */
435 #if defined(XR_FB_display_refresh_rate) && defined(XRT_FEATURE_OPENXR_DISPLAY_REFRESH_RATE)
436 #define OXR_HAVE_FB_display_refresh_rate
437 #define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) _(FB_display_refresh_rate, FB_DISPLAY_REFRESH_RATE)
438 #else
439 #define OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_)
440 #endif
441 
442 /*
443  * XR_FB_passthrough
444  */
445 #if defined(XR_FB_passthrough) && defined(XRT_FEATURE_OPENXR_LAYER_PASSTHROUGH)
446 #define OXR_HAVE_FB_passthrough
447 #define OXR_EXTENSION_SUPPORT_FB_passthrough(_) _(FB_passthrough, FB_PASSTHROUGH)
448 #else
449 #define OXR_EXTENSION_SUPPORT_FB_passthrough(_)
450 #endif
451 
452 /*
453  * XR_ML_ml2_controller_interaction
454  */
455 #if defined(XR_ML_ml2_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_ML2)
456 #define OXR_HAVE_ML_ml2_controller_interaction
457 #define OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
458  _(ML_ml2_controller_interaction, ML_ML2_CONTROLLER_INTERACTION)
459 #else
460 #define OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_)
461 #endif
462 
463 
464 /*
465  * XR_MND_headless
466  */
467 #if defined(XR_MND_headless) && defined(XRT_FEATURE_OPENXR_HEADLESS)
468 #define OXR_HAVE_MND_headless
469 #define OXR_EXTENSION_SUPPORT_MND_headless(_) _(MND_headless, MND_HEADLESS)
470 #else
471 #define OXR_EXTENSION_SUPPORT_MND_headless(_)
472 #endif
473 
474 
475 /*
476  * XR_MND_swapchain_usage_input_attachment_bit
477  */
478 #if defined(XR_MND_swapchain_usage_input_attachment_bit)
479 #define OXR_HAVE_MND_swapchain_usage_input_attachment_bit
480 #define OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
481  _(MND_swapchain_usage_input_attachment_bit, MND_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT)
482 #else
483 #define OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_)
484 #endif
485 
486 
487 /*
488  * XR_MSFT_hand_interaction
489  */
490 #if defined(XR_MSFT_hand_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_MSFT_HAND)
491 #define OXR_HAVE_MSFT_hand_interaction
492 #define OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) _(MSFT_hand_interaction, MSFT_HAND_INTERACTION)
493 #else
494 #define OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_)
495 #endif
496 
497 
498 /*
499  * XR_MSFT_unbounded_reference_space
500  */
501 #if defined(XR_MSFT_unbounded_reference_space) && defined(XRT_FEATURE_OPENXR_SPACE_UNBOUNDED)
502 #define OXR_HAVE_MSFT_unbounded_reference_space
503 #define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \
504  _(MSFT_unbounded_reference_space, MSFT_UNBOUNDED_REFERENCE_SPACE)
505 #else
506 #define OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_)
507 #endif
508 
509 
510 /*
511  * XR_OPPO_controller_interaction
512  */
513 #if defined(XR_OPPO_controller_interaction) && defined(XRT_FEATURE_OPENXR_INTERACTION_OPPO)
514 #define OXR_HAVE_OPPO_controller_interaction
515 #define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) _(OPPO_controller_interaction, OPPO_CONTROLLER_INTERACTION)
516 #else
517 #define OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_)
518 #endif
519 
520 
521 /*
522  * XR_EXTX_overlay
523  */
524 #if defined(XR_EXTX_overlay) && defined(XRT_FEATURE_OPENXR_OVERLAY)
525 #define OXR_HAVE_EXTX_overlay
526 #define OXR_EXTENSION_SUPPORT_EXTX_overlay(_) _(EXTX_overlay, EXTX_OVERLAY)
527 #else
528 #define OXR_EXTENSION_SUPPORT_EXTX_overlay(_)
529 #endif
530 
531 
532 /*
533  * XR_HTCX_vive_tracker_interaction
534  */
535 #if defined(XR_HTCX_vive_tracker_interaction) && defined(ALWAYS_DISABLED)
536 #define OXR_HAVE_HTCX_vive_tracker_interaction
537 #define OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \
538  _(HTCX_vive_tracker_interaction, HTCX_VIVE_TRACKER_INTERACTION)
539 #else
540 #define OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_)
541 #endif
542 
543 
544 /*
545  * XR_MNDX_ball_on_a_stick_controller
546  */
547 #if defined(XR_MNDX_ball_on_a_stick_controller) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
548 #define OXR_HAVE_MNDX_ball_on_a_stick_controller
549 #define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
550  _(MNDX_ball_on_a_stick_controller, MNDX_BALL_ON_A_STICK_CONTROLLER)
551 #else
552 #define OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_)
553 #endif
554 
555 
556 /*
557  * XR_MNDX_egl_enable
558  */
559 #if defined(XR_MNDX_egl_enable) && defined(XR_USE_PLATFORM_EGL) && defined(XR_USE_GRAPHICS_API_OPENGL)
560 #define OXR_HAVE_MNDX_egl_enable
561 #define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) _(MNDX_egl_enable, MNDX_EGL_ENABLE)
562 #else
563 #define OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_)
564 #endif
565 
566 
567 /*
568  * XR_MNDX_force_feedback_curl
569  */
570 #if defined(XR_MNDX_force_feedback_curl) && defined(XRT_FEATURE_OPENXR_FORCE_FEEDBACK_CURL)
571 #define OXR_HAVE_MNDX_force_feedback_curl
572 #define OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) _(MNDX_force_feedback_curl, MNDX_FORCE_FEEDBACK_CURL)
573 #else
574 #define OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_)
575 #endif
576 
577 
578 /*
579  * XR_MNDX_hydra
580  */
581 #if defined(XR_MNDX_hydra) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
582 #define OXR_HAVE_MNDX_hydra
583 #define OXR_EXTENSION_SUPPORT_MNDX_hydra(_) _(MNDX_hydra, MNDX_HYDRA)
584 #else
585 #define OXR_EXTENSION_SUPPORT_MNDX_hydra(_)
586 #endif
587 
588 
589 /*
590  * XR_MNDX_system_buttons
591  */
592 #if defined(XR_MNDX_system_buttons) && defined(XRT_FEATURE_OPENXR_INTERACTION_MNDX)
593 #define OXR_HAVE_MNDX_system_buttons
594 #define OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_) _(MNDX_system_buttons, MNDX_SYSTEM_BUTTONS)
595 #else
596 #define OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_)
597 #endif
598 
599 
600 /*
601  * XR_HTC_facial_tracking
602  */
603 #if defined(XR_HTC_facial_tracking) && defined(XRT_FEATURE_OPENXR_FACIAL_TRACKING_HTC)
604 #define OXR_HAVE_HTC_facial_tracking
605 #define OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_) _(HTC_facial_tracking, HTC_FACIAL_TRACKING)
606 #else
607 #define OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_)
608 #endif
609 
610 // end of GENERATED per-extension defines - do not modify - used by scripts
611 
612 /*!
613  * Call this, passing a macro taking two parameters, to
614  * generate tables, code, etc. related to OpenXR extensions.
615  * Upon including invoking OXR_EXTENSION_SUPPORT_GENERATE() with some
616  * MY_HANDLE_EXTENSION(mixed_case, all_caps), MY_HANDLE_EXTENSION will be called
617  * for each extension implemented in Monado and supported in this build:
618  *
619  * - The first parameter is the name of the extension without the leading XR_
620  * prefix: e.g. `KHR_opengl_enable`
621  * - The second parameter is the same text as the first, but in all uppercase,
622  * since this transform cannot be done in the C preprocessor, and some
623  * extension-related entities use this instead of the exact extension name.
624  *
625  * Implementation note: This macro calls another macro for each extension: that
626  * macro is either defined to call your provided macro, or defined to nothing,
627  * depending on if the extension is supported in this build.
628  *
629  * @note Do not edit anything between `clang-format off` and `clang-format on` -
630  * it will be replaced next time this file is generated!
631  */
632 // clang-format off
633 #define OXR_EXTENSION_SUPPORT_GENERATE(_) \
634  OXR_EXTENSION_SUPPORT_KHR_android_create_instance(_) \
635  OXR_EXTENSION_SUPPORT_KHR_android_thread_settings(_) \
636  OXR_EXTENSION_SUPPORT_KHR_binding_modification(_) \
637  OXR_EXTENSION_SUPPORT_KHR_composition_layer_color_scale_bias(_) \
638  OXR_EXTENSION_SUPPORT_KHR_composition_layer_cube(_) \
639  OXR_EXTENSION_SUPPORT_KHR_composition_layer_cylinder(_) \
640  OXR_EXTENSION_SUPPORT_KHR_composition_layer_depth(_) \
641  OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect(_) \
642  OXR_EXTENSION_SUPPORT_KHR_composition_layer_equirect2(_) \
643  OXR_EXTENSION_SUPPORT_KHR_convert_timespec_time(_) \
644  OXR_EXTENSION_SUPPORT_KHR_D3D11_enable(_) \
645  OXR_EXTENSION_SUPPORT_KHR_D3D12_enable(_) \
646  OXR_EXTENSION_SUPPORT_KHR_loader_init(_) \
647  OXR_EXTENSION_SUPPORT_KHR_loader_init_android(_) \
648  OXR_EXTENSION_SUPPORT_KHR_opengl_enable(_) \
649  OXR_EXTENSION_SUPPORT_KHR_opengl_es_enable(_) \
650  OXR_EXTENSION_SUPPORT_KHR_swapchain_usage_input_attachment_bit(_) \
651  OXR_EXTENSION_SUPPORT_KHR_visibility_mask(_) \
652  OXR_EXTENSION_SUPPORT_KHR_vulkan_enable(_) \
653  OXR_EXTENSION_SUPPORT_KHR_vulkan_enable2(_) \
654  OXR_EXTENSION_SUPPORT_KHR_vulkan_swapchain_format_list(_) \
655  OXR_EXTENSION_SUPPORT_KHR_win32_convert_performance_counter_time(_) \
656  OXR_EXTENSION_SUPPORT_EXT_debug_utils(_) \
657  OXR_EXTENSION_SUPPORT_EXT_dpad_binding(_) \
658  OXR_EXTENSION_SUPPORT_EXT_eye_gaze_interaction(_) \
659  OXR_EXTENSION_SUPPORT_EXT_hand_interaction(_) \
660  OXR_EXTENSION_SUPPORT_EXT_hand_tracking(_) \
661  OXR_EXTENSION_SUPPORT_EXT_hp_mixed_reality_controller(_) \
662  OXR_EXTENSION_SUPPORT_EXT_local_floor(_) \
663  OXR_EXTENSION_SUPPORT_EXT_palm_pose(_) \
664  OXR_EXTENSION_SUPPORT_EXT_performance_settings(_) \
665  OXR_EXTENSION_SUPPORT_EXT_samsung_odyssey_controller(_) \
666  OXR_EXTENSION_SUPPORT_FB_composition_layer_alpha_blend(_) \
667  OXR_EXTENSION_SUPPORT_FB_composition_layer_image_layout(_) \
668  OXR_EXTENSION_SUPPORT_FB_composition_layer_settings(_) \
669  OXR_EXTENSION_SUPPORT_FB_composition_layer_depth_test(_) \
670  OXR_EXTENSION_SUPPORT_FB_display_refresh_rate(_) \
671  OXR_EXTENSION_SUPPORT_FB_passthrough(_) \
672  OXR_EXTENSION_SUPPORT_ML_ml2_controller_interaction(_) \
673  OXR_EXTENSION_SUPPORT_MND_headless(_) \
674  OXR_EXTENSION_SUPPORT_MND_swapchain_usage_input_attachment_bit(_) \
675  OXR_EXTENSION_SUPPORT_MSFT_hand_interaction(_) \
676  OXR_EXTENSION_SUPPORT_MSFT_unbounded_reference_space(_) \
677  OXR_EXTENSION_SUPPORT_OPPO_controller_interaction(_) \
678  OXR_EXTENSION_SUPPORT_EXTX_overlay(_) \
679  OXR_EXTENSION_SUPPORT_HTCX_vive_tracker_interaction(_) \
680  OXR_EXTENSION_SUPPORT_MNDX_ball_on_a_stick_controller(_) \
681  OXR_EXTENSION_SUPPORT_MNDX_egl_enable(_) \
682  OXR_EXTENSION_SUPPORT_MNDX_force_feedback_curl(_) \
683  OXR_EXTENSION_SUPPORT_MNDX_hydra(_) \
684  OXR_EXTENSION_SUPPORT_MNDX_system_buttons(_) \
685  OXR_EXTENSION_SUPPORT_HTC_facial_tracking(_)
686 // clang-format on
Include all of the openxr headers in one place.