summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorGravatar Markus Wick2021-04-07 08:42:54 +0200
committerGravatar Markus Wick2021-04-07 22:38:52 +0200
commit5145133a604f626c05f832465ac22019b003c32a (patch)
tree81aa729ab6897cadeb1251f6adcafaeab1010f0d /src/video_core/gpu.cpp
parentcommon/threadsafe_queue: Provide Wait() method. (diff)
downloadyuzu-5145133a604f626c05f832465ac22019b003c32a.tar.gz
yuzu-5145133a604f626c05f832465ac22019b003c32a.tar.xz
yuzu-5145133a604f626c05f832465ac22019b003c32a.zip
video_core/gpu_thread: Implement a ShutDown method.
This was implicitly done by `is_powered_on = false`, however the explicit method allows us to block until the GPU is actually gone. This should fix a race condition while removing the other subsystems while the GPU is still active.
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r--src/video_core/gpu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index c61f44619..009c6f574 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -517,8 +517,8 @@ void GPU::TriggerCpuInterrupt(const u32 syncpoint_id, const u32 value) const {
517 interrupt_manager.GPUInterruptSyncpt(syncpoint_id, value); 517 interrupt_manager.GPUInterruptSyncpt(syncpoint_id, value);
518} 518}
519 519
520void GPU::WaitIdle() const { 520void GPU::ShutDown() {
521 gpu_thread.WaitIdle(); 521 gpu_thread.ShutDown();
522} 522}
523 523
524void GPU::OnCommandListEnd() { 524void GPU::OnCommandListEnd() {