Using DMA buffer with QtWayland
-
wrote on 28 Nov 2022, 14:59 last edited by
Hi,
I have built the Qt 6.4.0 from the sources and would like to run a wayland using DMA buffers, so not
waylang-egl
usingQT_WAYLAND_CLIENT_BUFFER_INTEGRATION
env variable like explained here: https://code.qt.io/cgit/qt/qtwayland.git/tree/README.The error message I get when I set
QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=linux-dmabuf-unstable-v1
is thatlinux-dmabuf-unstable-v1
is not available, onlywaylang-egl
.I see that plugin is built as
QT_FEATURE_wayland_dmabuf_client_buffer
is set to 1 and running cmake onqtwayland
module shows that dma libraries are detected:Qt Wayland Drivers: EGL .................................... yes Raspberry Pi ........................... no DRM EGL ................................ yes libhybris EGL .......................... no Linux dma-buf server buffer integration yes Shm emulation server buffer integration yes Vulkan-based server buffer integration . no
Am I missing something or the approach, in this case, is wrong?
Looking forward to your reply.
Regards,
Nedim -
wrote on 30 Dec 2022, 18:13 last edited by
Hi, I just checked on my Yocto development setup with Qt 6.4 that linux-dmabuf works as expected. So, I think we have to figure out where your configuration differs from mine. My compositor is started with
$> QT_WAYLAND_CLIENT_BUFFER_INTEGRATION=linux-dmabuf-unstable-v1 XDG_RUNTIME_DIR=/var/run qmlscene Compositor.qml -platform eglfs
which should be all that is needed to enable linux-dmabuf. The client test application is started with
$> XDG_RUNTIME_DIR=/var/run qmlscene Client.qml -platform wayland-egl
When now also setting WAYLAND_DEBUG=1, all the nice infos about "zwp_linux_dmabuf_v1..." are printed, so the protocol is definitely enabled.
Looking at the QtWayland config output, I see the very same summary
Qt Wayland Drivers: EGL .................................... yes Raspberry Pi ........................... no DRM EGL ................................ yes libhybris EGL .......................... no Linux dma-buf server buffer integration yes Shm emulation server buffer integration yes Vulkan-based server buffer integration . no
Thus, I expect that there is something wrong with your compositor startup. Can you check that the compositor is started the same way as noted above?