[Development] Using DMA instead of SHM in non OpenGL apps (Linux/Wayland)

Kai Uwe Broulik kde at privat.broulik.de
Mon Aug 7 08:44:06 CEST 2023


Hi,

Qt Wayland Client currently relies on EGL through wayland-egl 
integration to do the right thing. On Mesa for instance Qt indeed 
transparently uses zwp_linux_dmabuf_v1.

However, I agree that Qt itself should have an implementation of the 
aforementioned protocol on the *client* side, too (Qt Wayland Compositor 
supports clients talking dmabuf to it), for platforms where this is not 
done under the hood.

Code that could serve as an inspiration is the compositor dmabuf-v1 
implementation [1], a client side integration [2] (this is what you want 
to write, just using dmabuf instead), a weston example implementation [3].

Cheers
Kai Uwe

[1] 
https://code.qt.io/cgit/qt/qtwayland.git/tree/src/hardwareintegration/compositor/linux-dmabuf-unstable-v1
[2] 
https://code.qt.io/cgit/qt/qtwayland.git/tree/src/hardwareintegration/compositor/wayland-egl
[3] 
https://gitlab.freedesktop.org/wayland/weston/-/blob/main/clients/simple-dmabuf-egl.c


More information about the Development mailing list