diff options
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index a44015c0dd..dbc7d43553 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp @@ -144,6 +144,12 @@ struct GPU::Impl { sync_request_cv.wait(lck, [this, fence] { return CurrentSyncRequestFence() >= fence; }); } + void WaitForIdle() { + const u64 fence = RequestSyncOperation([] {}); + gpu_thread.TickGPU(is_async); + WaitForSyncOperation(fence); + } + /// Tick pending requests within the GPU. void TickWork() { std::unique_lock lck{sync_request_mutex}; @@ -484,6 +490,10 @@ void GPU::NotifyShutdown() { impl->NotifyShutdown(); } +void GPU::WaitForIdle() { + impl->WaitForIdle(); +} + void GPU::ObtainContext() { impl->ObtainContext(); } |
