3 ms·
> some desktop environments now even work with Wayland (as of 2020). Wayland compositors themselves work. What is a problem is sharing GPU resources between d
by vetinari 6y ago
> some desktop environments now even work with Wayland (as of 2020).
Wayland compositors themselves work. What is a problem is sharing GPU resources between different applications using different APIs.
I.e., you have your compositor using OpenGL and your application using Vulkan. The application renders itself into a buffer and sends it to the compositor, to render the desktop.
If the compositor and application cannot share buffers, the application has to read it from GPU, put into system RAM and share with compositor via SHM. The compositor then writes it back to VRAM. (Obviously, when application renders itself via software-only, this is not an issue.)
When the compositor and application can share buffer, the application just send the buffer handle to compositor, done.
This sharing on Linux is done via dma-buf. AMD and Intel drivers use dma-buf, so it is not a problem. Nvidia proprietary driver doesn't, it uses it's own EGLStreams, so it is incompatible with compositors. It is similar, as if Nvidia drivers for Windows started ignoring WDDM and started doing their own thing, complete with their own display server. It would also become incompatible with the rest of system. For some reason, Nvidia thinks it is fine to do that in Linux something, that they would not dare to do in Windows.