diff options
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 80a1c69e0..8c0ff0094 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -249,6 +249,11 @@ struct GPU::Impl { | |||
| 249 | 249 | ||
| 250 | void RegisterSyncptInterrupt(u32 syncpoint_id, u32 value) { | 250 | void RegisterSyncptInterrupt(u32 syncpoint_id, u32 value) { |
| 251 | std::scoped_lock lock{sync_mutex}; | 251 | std::scoped_lock lock{sync_mutex}; |
| 252 | u32 current_value = syncpoints.at(syncpoint_id).load(); | ||
| 253 | if ((static_cast<s32>(current_value) - static_cast<s32>(value)) >= 0) { | ||
| 254 | TriggerCpuInterrupt(syncpoint_id, value); | ||
| 255 | return; | ||
| 256 | } | ||
| 252 | auto& interrupt = syncpt_interrupts.at(syncpoint_id); | 257 | auto& interrupt = syncpt_interrupts.at(syncpoint_id); |
| 253 | bool contains = std::any_of(interrupt.begin(), interrupt.end(), | 258 | bool contains = std::any_of(interrupt.begin(), interrupt.end(), |
| 254 | [value](u32 in_value) { return in_value == value; }); | 259 | [value](u32 in_value) { return in_value == value; }); |