This depends on an as-of-yet nonstandardized (1) Wayland protocol and (2) Vulkan extension.
The Wayland protocol is being discussed on wayland-devel:
The Vulkan extension is being discussed here:
A Mesa implementation for radv is available here. Implementing it for other drivers should be trivial if you want to test it on some other Mesa Vulkan driver; the bulk of the changes are in shared WSI code.
- How much of this can we/should we share with
WINDOW_DIRECT_RANDR? That file is already abstracted between
DIRECT_NVIDA, but both use X so the file is ill-prepared to be further abstracted for Wayland. Two functions between direct_randr/direct_nvidia and direct_wayland are 1:1 identical, and a third has a lot of similar code and may be abstractable. Perhaps code sharing is the right compromise?