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

Eduardo Hopperdietzel ehopperdietzel at gmail.com
Mon Aug 7 06:47:42 CEST 2023


Hello,

I've noticed that Qt currently uses shared memory for buffer sharing with
Wayland compositors in non-OpenGL rendering applications. However, a more
efficient approach would be to use the zwp_linux_dmabuf_v1 protocol. By
creating a DMA buffer, mapping it, and performing CPU rendering there, the
compositor could directly import the buffers into the GPU, eliminating the
need for extra copies. This optimization would significantly improve
performance, particularly when scaling large windows on HiDPI displays. The
implementation on the Qt side should be almost identical to using shared
memory (I think).

I would be willing to implement this, and I would appreciate it if you
could guide me to the code that handles this. I assume I should look into
the code of the Wayland platform plugin?

Best regards,

Eduardo Hopperdietzel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230807/de1570fc/attachment.htm>


More information about the Development mailing list