summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu.cpp7
-rw-r--r--src/video_core/gpu.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index efea23bf2..cdb2f804e 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -97,15 +97,18 @@ void GPU::RegisterSyncptInterrupt(const u32 syncpoint_id, const u32 value) {
syncpt_interrupts[syncpoint_id].emplace_back(value);
}
-void GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) {
+bool GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) {
+ sync_mutex.lock();
auto it = syncpt_interrupts[syncpoint_id].begin();
while (it != syncpt_interrupts[syncpoint_id].end()) {
if (value == *it) {
it = syncpt_interrupts[syncpoint_id].erase(it);
- return;
+ return true;
}
it++;
}
+ return false;
+ sync_mutex.unlock();
}
u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 9bd618941..94afc91f8 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -174,7 +174,7 @@ public:
void RegisterSyncptInterrupt(const u32 syncpoint_id, const u32 value);
- void CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value);
+ bool CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value);
void Guard(bool guard_set) {
if (guard_set) {