summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-17 15:27:42 -0400
committerGravatar FernandoS272019-07-05 15:49:29 -0400
commit0335a25d1fcca5328ef79b3c62edb679df63ffba (patch)
tree0eec4de7bba608839dfad8ee0501caa1d21cc009 /src/video_core/gpu.cpp
parentNVServices: Correct CtrlEventWaitSync to block the ipc until timeout. (diff)
downloadyuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar.gz
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.tar.xz
yuzu-0335a25d1fcca5328ef79b3c62edb679df63ffba.zip
NVServices: Make NVEvents Automatic according to documentation.
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) {
97 syncpt_interrupts[syncpoint_id].emplace_back(value); 97 syncpt_interrupts[syncpoint_id].emplace_back(value);
98} 98}
99 99
100void GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) { 100bool GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) {
101 sync_mutex.lock();
101 auto it = syncpt_interrupts[syncpoint_id].begin(); 102 auto it = syncpt_interrupts[syncpoint_id].begin();
102 while (it != syncpt_interrupts[syncpoint_id].end()) { 103 while (it != syncpt_interrupts[syncpoint_id].end()) {
103 if (value == *it) { 104 if (value == *it) {
104 it = syncpt_interrupts[syncpoint_id].erase(it); 105 it = syncpt_interrupts[syncpoint_id].erase(it);
105 return; 106 return true;
106 } 107 }
107 it++; 108 it++;
108 } 109 }
110 return false;
111 sync_mutex.unlock();
109} 112}
110 113
111u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { 114u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {