Skip to content

egl/wayland: Ignore server modifiers for render buffer with PRIME copy

Ian Douglas Scott requested to merge ids1024/mesa:wayland-prime-modifier into main

If fd_render_gpu != fd_display_gpu, the buffer allocated here is never sent to the server, and is just copied to a linear buffer. So there is no reason to consider what modifiers the server supports here.

This fixes an issue I see rendering with Nouveau as the DRI_PRIME render GPU, with a compositor that doesn't advertise "Invalid" modifiers. I believe it attempted to use a linear buffer (the only option other than vendor specific modifiers it couldn't use), then Nouveau failed to render to the buffer with dmesg errors, and just presented uninitialized memory.

Fixes #8777, which seems to be the same issue I saw. Though I've only tested with Smithay and don't know what dmabuf formats KWin advertises.

Merge request reports