Enabling VSync in Vulkan

How to use vsync in Vulkan? I am on Windows, but the code should also work on Linux. Is this implemented by inserting a fence in vkAcquireNextImageKHR ?

+7
c ++ c vulkan vsync
source share
1 answer

Although you could understand that using a fence, the correct way would be to use a presentation mode that expects vertical workpieces, such as VK_PRESENT_MODE_FIFO_KHR.

Intel has an excellent article detailing various Vulkan presentation modes here

Please note that this mode may not be available on every device and that some drivers may ignore v-sync even if you select the appropriate presentation mode. Therefore, if you use one of these modes and do not get v-sync, you may need a new driver.

But if it is implemented inside the driver, this is the correct way to perform v-synchronization on all platforms supported by Vulkan.

+9
source share

All Articles