···1515also includes a section for changes that have not yet been in a tagged
1616release.
1717* @ref md_targets
1818+* @ref vulkan-extensions
1819* @ref md_writing-a-new-driver (**not complete**)
19202021## Source layout
+133
doc/vulkan-extensions.md
···11+# Vulkan extensions used by Monado {#vulkan-extensions}
22+33+<!--
44+Copyright 2020, Collabora, Ltd. and the Monado contributors
55+SPDX-License-Identifier: BSL-1.0
66+-->
77+88+<!--
99+adjacent vertical lines: for column spans. Aligning final vertical line
1010+with last column's closing bar, to keep the text looking close to the rendered
1111+version.
1212+1313+Using manual "footnotes" to keep table somewhat narrow.
1414+1515+Do not reflow this table!
1616+1717+Edit with word-wrap disabled and with a multiple-cursor capable editor to
1818+minimize frustration.
1919+2020+-->
2121+2222+| | Client | XCB server (a) | Wayland server (a) | Xlib-xrandr server (b) | NVIDIA xrandr server (b) | Android server | Windows server |
2323+| ---------------------------------------------------|--------|----------------|--------------------|------------------------|--------------------------|----------------|----------------|
2424+| **Instance extensions** ||||||||
2525+| [`VK_KHR_external_fence_capabilities`][] (8) | yes? |||||||
2626+| [`VK_KHR_external_memory_capabilities`][] (8) | yes? |||||||
2727+| [`VK_KHR_external_semaphore_capabilities`][] (8) | yes? |||||||
2828+| [`VK_KHR_get_physical_device_properties2`][] (8) | yes |||||||
2929+| [`VK_KHR_surface`][] | | yes ||||||
3030+| [`VK_KHR_display`][] | | | | yes (2) (requires `VK_KHR_surface`) || | |
3131+| **Platform-specific instance extensions** ||||||||
3232+| [`VK_KHR_xcb_surface`][] | | yes (1, 4) | | | | | |
3333+| [`VK_KHR_wayland_surface`][] | | | yes (1, 4) | | | | |
3434+| [`VK_EXT_direct_mode_display`][] | | | | yes (1) | yes (2) | | |
3535+| [`VK_EXT_acquire_xlib_display`][] | | | | yes (1) (in shared code) || | |
3636+| [`VK_KHR_android_surface`][] | | | | | | yes (1, 4) | |
3737+| [`VK_KHR_win32_surface`][] | | | | | | | yes (1, 4) |
3838+| **Device Extensions** ||||||||
3939+| [`VK_KHR_get_memory_requirements2`][] (8) | yes |||||||
4040+| [`VK_KHR_dedicated_allocation`][] (8) | yes? (requires `VK_KHR_get_memory_requirements2`) |||||||
4141+| [`VK_KHR_external_fence`][] (8) (+platform: 5) | yes (soon) |||||||
4242+| [`VK_KHR_external_memory`][] (8) (+platform: 6) | yes |||||||
4343+| [`VK_KHR_external_semaphore`][] (8) (+platform: 7) | yes (soon) |||||||
4444+| [`VK_KHR_swapchain`][] | | yes ||||||
4545+4646+## Notes
4747+4848+Kept out of the table above to limit its width.
4949+5050+* Server type:
5151+ * a: Windowed
5252+ * b: Direct mode
5353+* Usage details/reason:
5454+ * 1: Used directly
5555+ * 2: Dependency of `VK_EXT_direct_mode_display`
5656+ * 3: Dependency of `VK_EXT_acquire_xlib_display`
5757+ * 4: Platform extension building on `VK_KHR_surface`
5858+ * 5: Platform-specific extensions building on `VK_KHR_external_fence`:
5959+ * Linux and Android: [`VK_KHR_external_fence_fd`][]
6060+ * Windows: [`VK_KHR_external_fence_win32`][]
6161+ * Note: These platform-specific extensions were not promoted to Core in
6262+ Vulkan 1.1, only the platform-independent base extension.
6363+ * 6: Platform-specific extensions building on `VK_KHR_external_memory`:
6464+ * Linux: [`VK_KHR_external_memory_fd`][]
6565+ * Android: [`VK_ANDROID_external_memory_android_hardware_buffer`][] (`fd`
6666+ also usually available?)
6767+ * Windows: [`VK_KHR_external_memory_win32`][]
6868+ * Note: These platform-specific extensions were not promoted to Core in
6969+ Vulkan 1.1, only the platform-independent base extension.
7070+ * 7: Platform-specific extensions building on `VK_KHR_external_semaphore`:
7171+ * Linux and Android: [`VK_KHR_external_semaphore_fd`][]
7272+ * Windows: [`VK_KHR_external_semaphore_win32`][]
7373+ * Note: These platform-specific extensions were not promoted to Core in
7474+ Vulkan 1.1, only the platform-independent base extension.
7575+ * 8: Promoted to Vulkan 1.1 Core
7676+7777+<!-- links to the extension references, out of line to keep the table source readable -->
7878+<!-- They don't show up like this in the formatted document. -->
7979+8080+[`VK_KHR_external_fence_capabilities`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence_capabilities.html
8181+[`VK_KHR_external_memory_capabilities`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory_capabilities.html
8282+[`VK_KHR_external_semaphore_capabilities`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore_capabilities.html
8383+[`VK_KHR_get_physical_device_properties2`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_get_physical_device_properties2.html
8484+[`VK_KHR_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_surface.html
8585+[`VK_KHR_display`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_display.html
8686+[`VK_KHR_xcb_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_xcb_surface.html
8787+[`VK_KHR_wayland_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_wayland_surface.html
8888+[`VK_EXT_direct_mode_display`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_direct_mode_display.html
8989+[`VK_EXT_acquire_xlib_display`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_acquire_xlib_display.html
9090+[`VK_KHR_android_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_android_surface.html
9191+[`VK_KHR_win32_surface`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_win32_surface.html
9292+[`VK_KHR_dedicated_allocation`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_dedicated_allocation.html
9393+[`VK_KHR_external_fence`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence.html
9494+[`VK_KHR_external_memory`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory.html
9595+[`VK_KHR_external_semaphore`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore.html
9696+[`VK_KHR_get_memory_requirements2`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_get_memory_requirements2.html
9797+[`VK_KHR_swapchain`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_swapchain.html
9898+[`VK_KHR_external_fence_fd`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence_fd.html
9999+[`VK_KHR_external_fence_win32`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_fence_win32.html
100100+[`VK_KHR_external_memory_fd`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory_fd.html
101101+[`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
102102+[`VK_KHR_external_memory_win32`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory_win32.html
103103+[`VK_KHR_external_semaphore_fd`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore_fd.html
104104+[`VK_KHR_external_semaphore_win32`]: https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_semaphore_win32.html
105105+106106+## Reasons
107107+108108+* Instance extensions:
109109+ * `VK_KHR_surface` - for configuring output surface.
110110+ * `VK_KHR_get_physical_device_properties2` - for getting device UUID to share
111111+ between client compositor and main/native compositor.
112112+113113+* Device extensions:
114114+ * `VK_KHR_swapchain` - for displaying output on a display output.
115115+116116+## Code locations
117117+118118+* Client
119119+ * Instance extensions:
120120+ [xrt_gfx_vk_instance_extensions](@ref xrt_gfx_vk_instance_extensions)
121121+ * Device extensions:
122122+ [xrt_gfx_vk_device_extensions](@ref xrt_gfx_vk_device_extensions)
123123+124124+* Server
125125+ * All these are in [comp_compositor.c](@ref comp_compositor.c), with the
126126+ extensions required by all servers defined in
127127+ `COMP_INSTANCE_EXTENSIONS_COMMON`
128128+ * XCB (Windowed) Server: `instance_extensions_xcb`
129129+ * Wayland (Windowed) Server: `instance_extensions_wayland`
130130+ * Xlib-xrandr direct mode server and NVIDIA direct mode server:
131131+ `instance_extensions_direct_mode`
132132+ * Android server: `instance_extensions_android`
133133+ * Windows server: `instance_extensions_windows`