Skip to content

egl: Use Wayland platform instead of surfaceless

When using EGL for downloading DMA buffers, and if we're on a system with both an Intel GPU and an NVIDIA GPU using the proprietary driver, using the surfaceless EGL platform will not work, as it may end up a different GPU than what was used by the display server. This would normally not be a problem, since the free drivers know how to handle this, but with the proprietary NVIDIA driver, importing the DMA buffers will fail, resulting in black screens.

Work around this issue by creating a EGL display using the Wayland EGL platform. While we're not going to use anything directly Wayland related, what it means is we piggy back on the GPU selection mechanism used to end up with the likely correct GPU used for the EGL context, meaning DMA buffer imports starts to work and we get the correct content again.

Merge request reports