From 2463188fed94dbf9ced64206b4ae035591042ab6 Mon Sep 17 00:00:00 2001 From: sonninnos <45124675+sonninnos@users.noreply.github.com> Date: Wed, 15 Nov 2023 23:18:31 +0200 Subject: [PATCH] (D3D11+12) Improve 'Max Frame Latency' logging (#15911) --- gfx/drivers/d3d11.c | 5 ++++- gfx/drivers/d3d12.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index 81f712714b..aeefa5494b 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -2016,7 +2016,10 @@ static bool d3d11_init_swapchain(d3d11_video_t* d3d11, DXGISetMaximumFrameLatency(d3d11->swapChain, max_latency); DXGIGetMaximumFrameLatency(d3d11->swapChain, &cur_latency); - RARCH_LOG("[D3D11]: Requesting %u maximum frame latency, using %u.\n", max_latency, cur_latency); + RARCH_LOG("[D3D11]: Requesting %u maximum frame latency, using %u%s.\n", + settings->uints.video_max_frame_latency, + cur_latency, + (d3d11->flags & D3D11_ST_FLAG_WAIT_FOR_VBLANK) ? " with WaitForVBlank" : ""); } #ifdef HAVE_DXGI_HDR diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index 7055465126..a1b26d4a1b 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -2371,7 +2371,10 @@ static bool d3d12_init_swapchain(d3d12_video_t* d3d12, DXGISetMaximumFrameLatency(d3d12->chain.handle, max_latency); DXGIGetMaximumFrameLatency(d3d12->chain.handle, &cur_latency); - RARCH_LOG("[D3D12]: Requesting %u maximum frame latency, using %u.\n", max_latency, cur_latency); + RARCH_LOG("[D3D12]: Requesting %u maximum frame latency, using %u%s.\n", + settings->uints.video_max_frame_latency, + cur_latency, + (d3d12->flags & D3D12_ST_FLAG_WAIT_FOR_VBLANK) ? " with WaitForVBlank" : ""); } #ifdef HAVE_WINDOW