summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorGravatar ameerj2022-01-03 12:31:33 -0500
committerGravatar ameerj2022-01-03 12:31:33 -0500
commitd866916f42c3bbb21aa6f046140737690c1ce47f (patch)
treecd549393ec6076b812d75abc7be87f3ec4b96312 /src/video_core/gpu.h
parentMerge pull request #7648 from bunnei/thread-pinning (diff)
downloadyuzu-d866916f42c3bbb21aa6f046140737690c1ce47f.tar.gz
yuzu-d866916f42c3bbb21aa6f046140737690c1ce47f.tar.xz
yuzu-d866916f42c3bbb21aa6f046140737690c1ce47f.zip
gpu: Use std::stop_token in WaitFence for VSync thread
Fixes a hang that may occur when stopping emulation and the VSync thread is blocked on the syncpoint condition variable.
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 500411176..cc65a7870 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -5,6 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include <memory> 7#include <memory>
8#include <stop_token>
8 9
9#include "common/bit_field.h" 10#include "common/bit_field.h"
10#include "common/common_types.h" 11#include "common/common_types.h"
@@ -209,7 +210,7 @@ public:
209 [[nodiscard]] const VideoCore::ShaderNotify& ShaderNotify() const; 210 [[nodiscard]] const VideoCore::ShaderNotify& ShaderNotify() const;
210 211
211 /// Allows the CPU/NvFlinger to wait on the GPU before presenting a frame. 212 /// Allows the CPU/NvFlinger to wait on the GPU before presenting a frame.
212 void WaitFence(u32 syncpoint_id, u32 value); 213 void WaitFence(u32 syncpoint_id, u32 value, std::stop_token stop_token = {});
213 214
214 void IncrementSyncPoint(u32 syncpoint_id); 215 void IncrementSyncPoint(u32 syncpoint_id);
215 216