1 # Vulkan® Window System Integration Layer
5 This project is a Vulkan® layer which implements some of the Vulkan® window system
6 integration extensions such as `VK_KHR_swapchain`. The layer is designed to be
7 GPU vendor agnostic when used as part of the Vulkan® ICD/loader architecture.
9 Our vision for the project is to become the de facto implementation for Vulkan®
10 window system integration extensions so that they need not be implemented in the
11 ICD; instead, the implementation of these extensions are shared across vendors
14 The project currently implements support for `VK_EXT_headless_surface` and
15 its dependencies. Experimental support for `VK_KHR_wayland_surface` can be
16 enabled via a build option [as explained below](#building-with-wayland-support).
22 * [CMake](https://cmake.org) version 3.4.3 or above.
24 * Vulkan® loader and associated headers with support for the
25 `VK_EXT_headless_surface` extension.
27 ### Building the Vulkan® loader
29 This step is not necessary if your system already has a loader and associated
30 headers with support for the `VK_EXT_headless_surface` extension. We include
31 these instructions for completeness.
34 git clone https://github.com/KhronosGroup/Vulkan-Loader.git
35 mkdir Vulkan-Loader/build
36 cd Vulkan-Loader/build
37 ../scripts/update_deps.py
38 cmake -C helper.cmake ..
43 ### Building the layer
45 The layer requires a version of the loader and headers that includes support for
46 the `VK_EXT_headless_surface` extension. By default, the build system will use
47 the system Vulkan® headers as reported by `pkg-config`. This may be overriden by
48 specifying `VULKAN_CXX_INCLUDE` in the CMake configuration, for example:
51 cmake . -DVULKAN_CXX_INCLUDE="path/to/vulkan-headers"
54 If the loader and associated headers already meet the requirements of the layer
55 then the build steps are straightforward:
62 #### Building with Wayland support
64 In order to build with Wayland support the `BUILD_WSI_WAYLAND` build option
65 must be used, the `SELECT_EXTERNAL_ALLOCATOR` option has to be set to
66 an allocator (currently only ion is supported) and the `KERNEL_DIR` option must
67 be defined as the root of the Linux kernel source.
70 cmake . -DVULKAN_CXX_INCLUDE="path/to/vulkan-header" \
71 -DBUILD_WSI_WAYLAND=1 \
72 -DSELECT_EXTERNAL_ALLOCATOR=ion \
73 -DKERNEL_DIR="path/to/linux-kernel-source"
76 Wayland support is still **EXPERIMENTAL**. What this means in practice is that
77 the support is incomplete and not ready for prime time.
81 Copy the shared library `libVkLayer_window_system_integration.so` and JSON
82 configuration `VkLayer_window_system_integration.json` into a Vulkan®
83 [implicit layer directory](https://vulkan.lunarg.com/doc/view/1.0.39.0/windows/layers.html#user-content-configuring-layers-on-linux).
87 We are open for contributions.
89 * The software is provided under the MIT license. Contributions to this project
90 are accepted under the same license.
91 * Please also ensure that each commit in the series has at least one
92 `Signed-off-by:` line, using your real name and email address. The names in
93 the `Signed-off-by:` and `Author:` lines must match. If anyone else
94 contributes to the commit, they must also add their own `Signed-off-by:`
95 line. By adding this line the contributor certifies the contribution is made
96 under the terms of the [Developer Certificate of Origin (DCO)](DCO.txt).
97 * Questions, bug reports, et cetera are raised and discussed on the issues page.
98 * Please make merge requests into the master branch.
99 * Code should be formatted with clang-format using the project's .clang-format
102 Contributors are expected to abide by the
103 [freedesktop.org code of conduct](https://www.freedesktop.org/wiki/CodeOfConduct/).
105 ## Khronos® Conformance
107 This software is based on a published Khronos® Specification and is expected to
108 pass the relevant parts of the Khronos® Conformance Testing Process when used as
109 part of a conformant Vulkan® implementation.