summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-29 01:06:04 -0700
committerbunnei <bunneidev@gmail.com>2021-05-29 01:06:04 -0700
commit8592f8a2b4cae1320b7e152f4d3a68ac7b39bfa3 (patch)
tree0e7ef0aa4ff134d53a46c0f1748a140c95db44fe /src/video_core/gpu.h
parent5388e6db840b32fac1cb70bd490a383c01cf7cd1 (diff)
video_core: gpu: WaitFence: Do not block threads during shutdown.
- Fixes a hang on shutdown when NVFlinger thread is waiting on a syncpoint that will never occur. - Commonly observed when stopping emulation in Super Mario Odyssey.
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 29a867863..a8e98e51b 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -389,6 +389,8 @@ private:
std::unique_ptr<Engines::KeplerMemory> kepler_memory;
/// Shader build notifier
std::unique_ptr<VideoCore::ShaderNotify> shader_notify;
+ /// When true, we are about to shut down emulation session, so terminate outstanding tasks
+ std::atomic_bool shutting_down{};
std::array<std::atomic<u32>, Service::Nvidia::MaxSyncPoints> syncpoints{};