summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-17 21:27:42 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-05 21:49:29 +0200
commit0335a25d1fcca5328ef79b3c62edb679df63ffba (patch)
tree0eec4de7bba608839dfad8ee0501caa1d21cc009 /src/video_core/gpu.cpp
parentNVServices: Correct CtrlEventWaitSync to block the ipc until timeout. (diff)
downloadyuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar.gz
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar.bz2
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar.lz
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar.xz
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar.zst
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.zip
Diffstat (limited to 'src/video_core/gpu.cpp')
-rw-r--r--src/video_core/gpu.cpp7
1 files changed, 5 insertions, 2 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) {