summaryrefslogtreecommitdiff
path: root/src/video_core/gpu_thread.cpp
diff options
context:
space:
mode:
authorGravatar Markus Wick2021-04-06 20:30:22 +0200
committerGravatar Markus Wick2021-04-07 22:38:52 +0200
commit4aec060f6de410698d5b0a5bffd42d4327b258e4 (patch)
tree224799482cc260b15af31274497d92c308393113 /src/video_core/gpu_thread.cpp
parentMerge pull request #6130 from degasus/better_assert_handling (diff)
downloadyuzu-4aec060f6de410698d5b0a5bffd42d4327b258e4.tar.gz
yuzu-4aec060f6de410698d5b0a5bffd42d4327b258e4.tar.xz
yuzu-4aec060f6de410698d5b0a5bffd42d4327b258e4.zip
common/threadsafe_queue: Provide Wait() method.
It shall block until there is something to consume in the queue. And use it for the GPU emulation instead of the spin loop. This is only in booting the emulator, however in BOTW this is the case for about 1 second.
Diffstat (limited to 'src/video_core/gpu_thread.cpp')
-rw-r--r--src/video_core/gpu_thread.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp
index 99353f15f..cd59a7faf 100644
--- a/src/video_core/gpu_thread.cpp
+++ b/src/video_core/gpu_thread.cpp
@@ -29,8 +29,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
29 system.RegisterHostThread(); 29 system.RegisterHostThread();
30 30
31 // Wait for first GPU command before acquiring the window context 31 // Wait for first GPU command before acquiring the window context
32 while (state.queue.Empty()) 32 state.queue.Wait();
33 ;
34 33
35 // If emulation was stopped during disk shader loading, abort before trying to acquire context 34 // If emulation was stopped during disk shader loading, abort before trying to acquire context
36 if (!state.is_running) { 35 if (!state.is_running) {