We need fences support in Wayland compositors
Submitted by Miguel A. Vico
Assigned to Wayland bug list
Description
There are several vendors that asynchronously commit wl_surface state changes to work around the limitation of wayland compositors using unfinished frames for composition.
Using unfinished frames causes the compositor to stall waiting for slow clients rendering to finish, missing frames from faster clients or even slowing them down if they are synchronized to compositor redraws.
Using EGL_NV_stream_fifo_synchronous on the client side to defer wl_surface.{attach, damage, commit} until a frame is finished is the way NVIDIA works around such limitation, but it goes against Wayland atomicity assumptions of surface updates.
This problem should be fixed on the compositor side. Using fences the compositor can query when a client buffer is finished and ready for composition.
There has been some discussion about this in https://bugs.freedesktop.org/show_bug.cgi?id=98731