Currently as it stands, FIFO_LATEST_READY is only supported in X11 and trying to use it in wayland it just exhibits the same behavior as mailbox. I have also used both the reference Weston compositor and the jay compositor, which both support the fifo-v1 protocol but both don’t use it when using FIFO_LATEST_READY.
It would be nice to have this implemented so that there is less of a need for needing x11 for when wanting to use this sync mode.
Hi @developer.nvidia.com.unlo, our driver does support PRESENT_MODE_FIFO_LATEST_READY_KHR on Wayland surfaces. Can you precisely describe how you want the behavior to meaningfully deviate from MAILBOX?
Using Debug wayland=1 for both games and vkcube show that there are no fifo binds, and zero limiting to the application framerate to (swapchainImageCount - 1) * refreshRate . This means that the output is very jittery similar to mailbox because there’s no binding of set or wait barriers used in the fifo_v1 protocol.
As well with testing I used the viewsonic XG2431at 60hz with a custom EDID that allows me to have zero motion blur at 60hz similar to a crt, this lets me see when a frame was dropped or out was out of sync.
When testing in X11, FIFO_LATEST_READY_KHR behaved as described in the vulkan spec.
The fifo_v1 protocol does not enable implementing FIFO_LATEST_READY behavior. It can only do FIFO-style delaying of presentations to future VBlanks. FIFO_LATEST_READY (and MAILBOX) match Wayland’s default behavior, which drops older presents if multiple become ready before a given VBlank.
The difference in smoothness you are experiencing may be explained by the lack of throttling to a consistent framerate. Throttling to (swapchainImageCount - 1) * refreshRate is not guaranteed, applications should instead explicitly implement their own throttling, if desired. To implement this you may want to use VK_EXT_present_timing to query the display’s refresh rate.
See this section of the spec:
4.1. Is the presentation engine required to wait for the next vblank to return images of obsolete present requests?
No, but images must be released in the same (FIFO) order they were presented in.