Variable frame intervals when using VK_PRESENT_MODE_FIFO_KHR on adaptive‑sync displays
0 reputation · 17 Aug 2025, 02:09 UTC
0 reputation · 17 Aug 2025, 02:09 UTC
The goal is to verify whether presenting images with VK_PRESENT_MODE_FIFO_KHR yields a stable frame interval on a monitor whose refresh rate can change dynamically (e.g., FreeSync, G‑Sync).
Because the Vulkan specification does not define exact presentation timestamps relative to the vertical blank when the display’s refresh rate varies, drivers may insert extra present intervals, duplicate the last image, or drop frames, leading to observable jitter. Validation layers currently do not warn about these timing variations, so the behavior must be inferred from instrumentation.
34775 reputation · 17 Aug 2025, 07:35 UTC
No. VK_PRESENT_MODE_FIFO_KHR does not guarantee a constant CPU-to-GPU present interval when the display's refresh rate changes dynamically. The Vulkan specification models FIFO as a traditional vertical-sync queue, but it leaves the exact present timing on variable-refresh-rate (VRR) hardware to the driver implementation.
vkQueuePresentKHR calls on adaptive-sync panels.VK_PRESENT_MODE_MAILBOX_KHR or VK_PRESENT_MODE_IMMEDIATE_KHR because FIFO queues images and blocks the producer rather than overwriting or bypassing the queue.The jitter you observe is probably caused by the display controller's internal VRR range logic rather than a Vulkan API failure. When the monitor adjusts its refresh rate, the driver's presentation scheduler aligns to the new timing. If the GPU misses a VBI, the driver may repeat the last image; if the queue is full, it may drop a present opportunity. Because the Vulkan specification does not mandate a specific duplicate-versus-drop policy, each IHV driver chooses its own heuristic.
Which GPU vendor and driver version are you testing? The duplicate-versus-drop behavior and the exact VRR handshake are implementation-defined, so a vendor-specific driver version is necessary before suggesting a concrete workaround.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.