From 8573190c7dbda89528ec6ae5f6b650909c4d4151 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 24 Jun 2024 18:12:59 +0200 Subject: [PATCH] [dxvk] Apply frame rate limiter before signaling frame latency event Otherwise we add latency for no reason. --- src/dxvk/dxvk_presenter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dxvk/dxvk_presenter.cpp b/src/dxvk/dxvk_presenter.cpp index efd3d7272..17a406e51 100644 --- a/src/dxvk/dxvk_presenter.cpp +++ b/src/dxvk/dxvk_presenter.cpp @@ -678,12 +678,14 @@ namespace dxvk { Logger::err(str::format("Presenter: vkWaitForPresentKHR failed: ", vr)); } + // Apply FPS limtier here to align it as closely with scanout as we can, + // and delay signaling the frame latency event to emulate behaviour of a + // low refresh rate display as closely as we can. + m_fpsLimiter.delay(); + // Always signal even on error, since failures here // are transparent to the front-end. m_signal->signal(frame.frameId); - - // Apply FPS limtier here to align it as closely with scanout as we can. - m_fpsLimiter.delay(); } }