Skip to content

wayland: Implement FIFO with a compositor-side fallback

Sebastian Wick requested to merge swick/mutter:wip/fifo-no-fallback into main

Something I've argued for since the beginning of the latest iteration of the FIFO protocol was that FIFO should get you FIFO, not FIFO but sometimes not. Unfortunately this has been ignored even though the concern has been shared with a bunch of other people from KDE, Valve and others.

The only change to the protocol is to not ignore FIFO barriers when the surface is occluded. The implementation here uses the main monitor of a surface, the primary monitor when it doesn't exist, and a 30hz fallback timer when even that one doesn't exist.

The mesa support is in this branch: https://gitlab.gnome.org/swick/mesa/-/commits/wip/fifo. It is basically the same as the frog-protocols one: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31329.

My hope is that this shows that it is a viable approach we can take upstream.

This is only lightly tested and I've not been able to trigger the fallback timer path so far, but it seems to get the job done of not stalling Vulkan apps in FIFO mode anymore.

The alternative where occlusion leads to ignoring FIFO barriers: !3355

Merge request reports