From b2c8d25638b05af63e9eb4d0fa902303aeec60a0 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 3 Jan 2025 14:49:02 +1000 Subject: [PATCH] GPUBackend: Only display CPU thread blocked messages if queueing --- src/core/gpu_backend.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/gpu_backend.cpp b/src/core/gpu_backend.cpp index e93f05736..b40f39ec0 100644 --- a/src/core/gpu_backend.cpp +++ b/src/core/gpu_backend.cpp @@ -292,7 +292,9 @@ bool GPUBackend::BeginQueueFrame() if (queued_frames <= g_settings.gpu_max_queued_frames) return false; - DEV_LOG("<-- {} queued frames, {} max, blocking CPU thread", queued_frames, g_settings.gpu_max_queued_frames); + if (g_settings.gpu_max_queued_frames > 0) + DEV_LOG("<-- {} queued frames, {} max, blocking CPU thread", queued_frames, g_settings.gpu_max_queued_frames); + s_cpu_thread_state.waiting_for_gpu_thread.store(true, std::memory_order_release); return true; } @@ -733,7 +735,9 @@ void GPUBackend::HandleSubmitFrameCommand(const GPUBackendFramePresentationParam if (s_cpu_thread_state.waiting_for_gpu_thread.compare_exchange_strong(expected, false, std::memory_order_acq_rel, std::memory_order_relaxed)) { - DEV_LOG("--> Unblocking CPU thread"); + if (g_settings.gpu_max_queued_frames > 0) + DEV_LOG("--> Unblocking CPU thread"); + s_cpu_thread_state.gpu_thread_wait.Post(); } }