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.
This commit is contained in:
parent
da8e0f6571
commit
d866916f42
3 changed files with 10 additions and 15 deletions
|
@ -5,6 +5,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <stop_token>
|
||||
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_types.h"
|
||||
|
@ -209,7 +210,7 @@ public:
|
|||
[[nodiscard]] const VideoCore::ShaderNotify& ShaderNotify() const;
|
||||
|
||||
/// Allows the CPU/NvFlinger to wait on the GPU before presenting a frame.
|
||||
void WaitFence(u32 syncpoint_id, u32 value);
|
||||
void WaitFence(u32 syncpoint_id, u32 value, std::stop_token stop_token = {});
|
||||
|
||||
void IncrementSyncPoint(u32 syncpoint_id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue