The open source OpenXR runtime
1# Vulkan extensions used by Monado {#vulkan-extensions}
2
3<!--
4Copyright 2020, Collabora, Ltd. and the Monado contributors
5SPDX-License-Identifier: BSL-1.0
6-->
7
8<!--
9adjacent vertical lines: for column spans. Aligning final vertical line
10with last column's closing bar, to keep the text looking close to the rendered
11version.
12
13Using manual "footnotes" to keep table somewhat narrow.
14
15Do not reflow this table!
16
17Edit with word-wrap disabled and with a multiple-cursor capable editor to
18minimize frustration.
19
20-->
21
22| | Client | XCB server (a) | Wayland server (a) | Xlib-xrandr server (b) | NVIDIA xrandr server (b) | Android server | Windows server |
23| ---------------------------------------------------|--------|----------------|--------------------|------------------------|--------------------------|----------------|----------------|
24| **Instance extensions** ||||||||
25| [`VK_KHR_external_fence_capabilities`][] (8) | yes? |||||||
26| [`VK_KHR_external_memory_capabilities`][] (8) | yes? |||||||
27| [`VK_KHR_external_semaphore_capabilities`][] (8) | yes? |||||||
28| [`VK_KHR_get_physical_device_properties2`][] (8) | yes |||||||
29| [`VK_KHR_surface`][] | | yes ||||||
30| [`VK_KHR_display`][] | | | | yes (2) (requires `VK_KHR_surface`) || | |
31| **Platform-specific instance extensions** ||||||||
32| [`VK_KHR_xcb_surface`][] | | yes (1, 4) | | | | | |
33| [`VK_KHR_wayland_surface`][] | | | yes (1, 4) | | | | |
34| [`VK_EXT_direct_mode_display`][] | | | | yes (1) | yes (2) | | |
35| [`VK_EXT_acquire_xlib_display`][] | | | | yes (1) (in shared code) || | |
36| [`VK_KHR_android_surface`][] | | | | | | yes (1, 4) | |
37| [`VK_KHR_win32_surface`][] | | | | | | | yes (1, 4) |
38| **Device Extensions** ||||||||
39| [`VK_KHR_get_memory_requirements2`][] (8) | yes |||||||
40| [`VK_KHR_dedicated_allocation`][] (8) | yes? (requires `VK_KHR_get_memory_requirements2`) |||||||
41| [`VK_KHR_external_fence`][] (8) (+platform: 5) | yes (soon) |||||||
42| [`VK_KHR_external_memory`][] (8) (+platform: 6) | yes |||||||
43| [`VK_KHR_external_semaphore`][] (8) (+platform: 7) | yes (soon) |||||||
44| [`VK_KHR_swapchain`][] | | yes ||||||
45| [`VK_KHR_timeline_semaphore`][] | opt | opt | opt | opt | opt | opt | opt |
46
47[`VK_EXT_debug_utils`][] is also used.
48
49## Notes
50
51Kept out of the preceding table to limit its width.
52
53* Server type:
54 * a: Windowed
55 * b: Direct mode
56* Usage details/reason:
57 * 1: Used directly
58 * 2: Dependency of `VK_EXT_direct_mode_display`
59 * 3: Dependency of `VK_EXT_acquire_xlib_display`
60 * 4: Platform extension building on `VK_KHR_surface`
61 * 5: Platform-specific extensions building on `VK_KHR_external_fence`:
62 * Linux and Android: [`VK_KHR_external_fence_fd`][]
63 * Windows: [`VK_KHR_external_fence_win32`][]
64 * Note: These platform-specific extensions were not promoted to Core in
65 Vulkan 1.1, only the platform-independent base extension.
66 * 6: Platform-specific extensions building on `VK_KHR_external_memory`:
67 * Linux: [`VK_KHR_external_memory_fd`][]
68 * Android: [`VK_ANDROID_external_memory_android_hardware_buffer`][] (`fd`
69 also usually available?)
70 * Windows: [`VK_KHR_external_memory_win32`][]
71 * Note: These platform-specific extensions were not promoted to Core in
72 Vulkan 1.1, only the platform-independent base extension.
73 * 7: Platform-specific extensions building on `VK_KHR_external_semaphore`:
74 * Linux and Android: [`VK_KHR_external_semaphore_fd`][]
75 * Windows: [`VK_KHR_external_semaphore_win32`][]
76 * Note: These platform-specific extensions were not promoted to Core in
77 Vulkan 1.1, only the platform-independent base extension.
78 * 8: Promoted to Vulkan 1.1 Core
79
80<!-- links to the extension references, out of line to keep the table source readable -->
81<!-- They don't show up like this in the formatted document. -->
82
83[`VK_KHR_external_fence_capabilities`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence_capabilities.html
84[`VK_KHR_external_memory_capabilities`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory_capabilities.html
85[`VK_KHR_external_semaphore_capabilities`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore_capabilities.html
86[`VK_KHR_get_physical_device_properties2`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_get_physical_device_properties2.html
87[`VK_KHR_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_surface.html
88[`VK_KHR_display`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_display.html
89[`VK_KHR_xcb_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_xcb_surface.html
90[`VK_KHR_wayland_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_wayland_surface.html
91[`VK_EXT_debug_utils`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_debug_utils.html
92[`VK_EXT_direct_mode_display`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_direct_mode_display.html
93[`VK_EXT_acquire_xlib_display`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_acquire_xlib_display.html
94[`VK_KHR_android_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_android_surface.html
95[`VK_KHR_win32_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_win32_surface.html
96[`VK_KHR_dedicated_allocation`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_dedicated_allocation.html
97[`VK_KHR_external_fence`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence.html
98[`VK_KHR_external_memory`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory.html
99[`VK_KHR_external_semaphore`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore.html
100[`VK_KHR_get_memory_requirements2`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_get_memory_requirements2.html
101[`VK_KHR_swapchain`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_swapchain.html
102[`VK_KHR_external_fence_fd`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence_fd.html
103[`VK_KHR_external_fence_win32`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence_win32.html
104[`VK_KHR_external_memory_fd`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory_fd.html
105[`VK_ANDROID_external_memory_android_hardware_buffer`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_ANDROID_external_memory_android_hardware_buffer.html
106[`VK_KHR_external_memory_win32`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory_win32.html
107[`VK_KHR_external_semaphore_fd`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore_fd.html
108[`VK_KHR_external_semaphore_win32`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore_win32.html
109
110## Reasons
111
112* Instance extensions:
113 * `VK_KHR_surface` - for configuring output surface.
114 * `VK_KHR_get_physical_device_properties2` - for getting device UUID to share
115 between client compositor and main/native compositor.
116
117* Device extensions:
118 * `VK_KHR_swapchain` - for displaying output on a display output.
119
120## Code locations
121
122* Client
123 * Instance extensions:
124 [xrt_gfx_vk_instance_extensions](@ref xrt_gfx_vk_instance_extensions)
125 * Device extensions:
126 [xrt_gfx_vk_device_extensions](@ref xrt_gfx_vk_device_extensions)
127
128* Server
129 * All these are in [comp_compositor.c](@ref comp_compositor.c), with the
130 extensions required by all servers defined in
131 `COMP_INSTANCE_EXTENSIONS_COMMON`
132 * XCB (Windowed) Server: `instance_extensions_xcb`
133 * Wayland (Windowed) Server: `instance_extensions_wayland`
134 * Xlib-xrandr direct mode server and NVIDIA direct mode server:
135 `instance_extensions_direct_mode`
136 * Android server: `instance_extensions_android`
137 * Windows server: `instance_extensions_windows`