Open emersion opened 4 years ago
Out of curiosity, are any current desktop Wayland compositors supporting that? Is there a standard protocol?
Yes, this is a standard protocol: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/master/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
All Wayland compositors support it.
I guess my questions was more whether any common compositors actually then proceeded to scan out the forwarded DMA-BUF, as opposed to compositing it. Mostly out of curiosity, as it seems to be a great thing to plumb regardless. We can probably have it as a 'wayland_can_avoid_composite' type thing that has a similar abstraction as the DRM one to short-circuit Vulkan. Ideally we'd grow that support for X11 hosts as well, was chatting with Keith about it a couple months ago but there's not really a firm plan for that yet.
Oh, I see. Some compositors will attempt direct scan-out: GNOME, Sway, Weston at least, I think KWin recently got support for that but I'm not 100% sure. I don't know about others.
It should be possible to add zero-copy support for our nested X11 window too via Present.
Avoid copying buffers when running nested: directly hand over the game's DMA-BUF to the parent compositor.