diff options
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 086db0e69..efea23bf2 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -70,13 +70,13 @@ const DmaPusher& GPU::DmaPusher() const { | |||
| 70 | void GPU::IncrementSyncPoint(const u32 syncpoint_id) { | 70 | void GPU::IncrementSyncPoint(const u32 syncpoint_id) { |
| 71 | syncpoints[syncpoint_id]++; | 71 | syncpoints[syncpoint_id]++; |
| 72 | sync_mutex.lock(); | 72 | sync_mutex.lock(); |
| 73 | if (!events[syncpoint_id].empty()) { | 73 | if (!syncpt_interrupts[syncpoint_id].empty()) { |
| 74 | u32 value = syncpoints[syncpoint_id].load(); | 74 | u32 value = syncpoints[syncpoint_id].load(); |
| 75 | auto it = events[syncpoint_id].begin(); | 75 | auto it = syncpt_interrupts[syncpoint_id].begin(); |
| 76 | while (it != events[syncpoint_id].end()) { | 76 | while (it != syncpt_interrupts[syncpoint_id].end()) { |
| 77 | if (value >= it->value) { | 77 | if (value >= *it) { |
| 78 | TriggerCpuInterrupt(it->event_id); | 78 | TriggerCpuInterrupt(syncpoint_id, *it); |
| 79 | it = events[syncpoint_id].erase(it); | 79 | it = syncpt_interrupts[syncpoint_id].erase(it); |
| 80 | continue; | 80 | continue; |
| 81 | } | 81 | } |
| 82 | it++; | 82 | it++; |
| @@ -89,19 +89,19 @@ u32 GPU::GetSyncpointValue(const u32 syncpoint_id) const { | |||
| 89 | return syncpoints[syncpoint_id].load(); | 89 | return syncpoints[syncpoint_id].load(); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | void GPU::RegisterEvent(const u32 event_id, const u32 syncpoint_id, const u32 value) { | 92 | void GPU::RegisterSyncptInterrupt(const u32 syncpoint_id, const u32 value) { |
| 93 | for (auto& ev : events[syncpoint_id]) { | 93 | for (u32 in_value : syncpt_interrupts[syncpoint_id]) { |
| 94 | if (ev.event_id == event_id && ev.value == value) | 94 | if (in_value == value) |
| 95 | return; | 95 | return; |
| 96 | } | 96 | } |
| 97 | events[syncpoint_id].emplace_back(event_id, value); | 97 | syncpt_interrupts[syncpoint_id].emplace_back(value); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | void GPU::CancelEvent(const u32 event_id, const u32 syncpoint_id, const u32 value) { | 100 | void GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) { |
| 101 | auto it = events[syncpoint_id].begin(); | 101 | auto it = syncpt_interrupts[syncpoint_id].begin(); |
| 102 | while (it != events[syncpoint_id].end()) { | 102 | while (it != syncpt_interrupts[syncpoint_id].end()) { |
| 103 | if (value == it->value) { | 103 | if (value == *it) { |
| 104 | it = events[syncpoint_id].erase(it); | 104 | it = syncpt_interrupts[syncpoint_id].erase(it); |
| 105 | return; | 105 | return; |
| 106 | } | 106 | } |
| 107 | it++; | 107 | it++; |