Vulkan Wayland Compositors Are Nearing Reality
The VK_EXT_physical_device_drm extension to Vulkan has been in the works for a number of months and is for allowing the mapping of Vulkan physical devices and DRM nodes. VK_EXT_physical_device_drm allows for querying DRM properties for physical devices and in turn matching the with DRM nodes on Linux systems.
This extension has been sought after by those working on Wayland compositors in pursuing Vulkan support compared to other less reliable means of matching devices to DRM nodes. With Vulkan 1.1 is already the rest of the additions needed for bringing up a Wayland compositor around external memory file descriptors, DMA-BUF handling, etc.
There is already support pending for supporting the EXT_physical_device_drm extension by the likes of the Mesa RADV driver. NVIDIA has also expressed interest in making use of this extension too.
This extension has been held up by a lack of Vulkan Conformance Test Suite (CTS) support with the original developer being disinterested in making the CTS test cases. CTS coverage is a requirement for "EXT" extensions and thus there was talk of demoting it to just a "MESA" extension to bypass that. But one of the NVIDIA developers took up to working on CTS test coverage.
Now that there is pending CTS coverage, it looks like VK_EXT_physical_device_drm will be officially added to the Vulkan registry soon. Additional excitement this week is work-in-progress Vulkan allocator support for WLROOTS, the library used by Sway and other Wayland compositors. This code is still a work-in-progress but provides initial Vulkan support and makes use of DMA-BUFs.
Thus we are nearing the point where all the bits are in Vulkan for nicely allowing Wayland-based compositors. It will be interesting to see how long though it takes other Wayland compositors like GNOME's Mutter and KDE KWin to provide optional Vulkan support. This Vulkan support is also good news as NVIDIA has been working to support this new functionality as well as DMA-BUF passing support for their driver, thus the Vulkan-powered Wayland compositors should ultimately work nice on NVIDIA hardware too.