Skip to content

Commit

Permalink
GPUBackend: Only display CPU thread blocked messages if queueing
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 3, 2025
1 parent 88cd086 commit b2c8d25
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/gpu_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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();
}
}
Expand Down

0 comments on commit b2c8d25

Please sign in to comment.