summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
events[syncpoint_id].emplace_back(event_id, value);
}
+void GPU::CancelEvent(const u32 event_id, const u32 syncpoint_id, const u32 value) {
+ auto it = events[syncpoint_id].begin();
+ while (it != events[syncpoint_id].end()) {
+ if (value == it->value) {
+ it = events[syncpoint_id].erase(it);
+ return;
+ }
+ it++;
+ }
+}
+
u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
ASSERT(format != RenderTargetFormat::NONE);
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:
u32 GetSyncpointValue(const u32 syncpoint_id) const;
- void RegisterEvent(const u32 event_id, const u32 sync_point_id, const u32 value);
+ void RegisterEvent(const u32 event_id, const u32 syncpoint_id, const u32 value);
+
+ void CancelEvent(const u32 event_id, const u32 syncpoint_id, const u32 value);
/// Returns a const reference to the GPU DMA pusher.
const Tegra::DmaPusher& DmaPusher() const;