From cd07a464fbb1469cdf28ea4815edeb501c0bb6cb Mon Sep 17 00:00:00 2001 From: niki Date: Tue, 27 Dec 2022 13:54:46 +0100 Subject: [PATCH] vulkan: document future possibility for vsync Right now we have to recreate the swapchain everytime vsync / present mode changes. VK_EXT_swapchain_maintenance1 might remove the need for this. However, right now there are not any drivers yet that support it. In the future, this might be the better way to handle this situation. --- src/modules/graphics/vulkan/Graphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/modules/graphics/vulkan/Graphics.cpp b/src/modules/graphics/vulkan/Graphics.cpp index 202bb070d..8da5a92a3 100644 --- a/src/modules/graphics/vulkan/Graphics.cpp +++ b/src/modules/graphics/vulkan/Graphics.cpp @@ -2702,6 +2702,11 @@ void Graphics::setVsync(int vsync) { this->vsync = vsync; + // With the extension VK_EXT_swapchain_maintenance1 a swapchain recreation might not be needed + // https://github.com/KhronosGroup/Vulkan-Docs/blob/main/proposals/VK_EXT_swapchain_maintenance1.adoc + // However, there are not any drivers that support it, yet. + // Reevaluate again in the future. + requestSwapchainRecreation(); } }