summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu.cpp11
-rw-r--r--src/video_core/gpu.h4
2 files changed, 14 insertions, 1 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index 06eb570ab..1fa6770ca 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -95,6 +95,17 @@ void GPU::RegisterEvent(const u32 event_id, const u32 syncpoint_id, const u32 va
95 events[syncpoint_id].emplace_back(event_id, value); 95 events[syncpoint_id].emplace_back(event_id, value);
96} 96}
97 97
98void GPU::CancelEvent(const u32 event_id, const u32 syncpoint_id, const u32 value) {
99 auto it = events[syncpoint_id].begin();
100 while (it != events[syncpoint_id].end()) {
101 if (value == it->value) {
102 it = events[syncpoint_id].erase(it);
103 return;
104 }
105 it++;
106 }
107}
108
98u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { 109u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
99 ASSERT(format != RenderTargetFormat::NONE); 110 ASSERT(format != RenderTargetFormat::NONE);
100 111
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index c3e5311fa..4805a5fbc 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -171,7 +171,9 @@ public:
171 171
172 u32 GetSyncpointValue(const u32 syncpoint_id) const; 172 u32 GetSyncpointValue(const u32 syncpoint_id) const;
173 173
174 void RegisterEvent(const u32 event_id, const u32 sync_point_id, const u32 value); 174 void RegisterEvent(const u32 event_id, const u32 syncpoint_id, const u32 value);
175
176 void CancelEvent(const u32 event_id, const u32 syncpoint_id, const u32 value);
175 177
176 /// Returns a const reference to the GPU DMA pusher. 178 /// Returns a const reference to the GPU DMA pusher.
177 const Tegra::DmaPusher& DmaPusher() const; 179 const Tegra::DmaPusher& DmaPusher() const;