From 2c62563ab58a70236a39571149f8370f3fdfb2a3 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sun, 7 Nov 2021 14:17:32 +0100 Subject: NVHOST_CTRl: Implement missing method and fix some stuffs. --- src/video_core/gpu.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video_core') 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 { void RegisterSyncptInterrupt(u32 syncpoint_id, u32 value) { std::scoped_lock lock{sync_mutex}; + u32 current_value = syncpoints.at(syncpoint_id).load(); + if ((static_cast(current_value) - static_cast(value)) >= 0) { + TriggerCpuInterrupt(syncpoint_id, value); + return; + } auto& interrupt = syncpt_interrupts.at(syncpoint_id); bool contains = std::any_of(interrupt.begin(), interrupt.end(), [value](u32 in_value) { return in_value == value; }); -- cgit v1.2.3