From 420fd4530ab184046cac40480d6f24bf317bd443 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Sun, 29 Oct 2023 14:27:33 +0100 Subject: [PATCH] Rely on Present wait in low latency mode if we have it. --- vulkan/wsi.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vulkan/wsi.cpp b/vulkan/wsi.cpp index 23c965ce..43ad1a19 100644 --- a/vulkan/wsi.cpp +++ b/vulkan/wsi.cpp @@ -514,8 +514,12 @@ bool WSI::begin_frame() Fence fence; // TODO: Improve this with fancier approaches as needed. - if (low_latency_mode_enable) + if (low_latency_mode_enable && + !device->get_device_features().present_wait_features.presentWait && + current_present_mode == PresentMode::SyncToVBlank) + { fence = device->request_legacy_fence(); + } auto acquire_ts = device->write_calibrated_timestamp(); result = table->vkAcquireNextImageKHR(context->get_device(), swapchain, UINT64_MAX, acquire->get_semaphore(),