diff options
| author | 2019-06-18 16:58:29 -0400 | |
|---|---|---|
| committer | 2019-07-05 15:49:31 -0400 | |
| commit | b391e5f6386eecf6170b544245e3e4e31427913c (patch) | |
| tree | 8a6cb553577e6f0e5f059d212fecee9e32fdc08d /src/video_core/gpu.cpp | |
| parent | NVServices: Make NVEvents Automatic according to documentation. (diff) | |
| download | yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.gz yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.tar.xz yuzu-b391e5f6386eecf6170b544245e3e4e31427913c.zip | |
NVFlinger: Correct GCC compile error
Diffstat (limited to 'src/video_core/gpu.cpp')
| -rw-r--r-- | src/video_core/gpu.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index cdb2f804e..278528618 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -69,7 +69,7 @@ const DmaPusher& GPU::DmaPusher() const { | |||
| 69 | 69 | ||
| 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 | std::lock_guard lock{sync_mutex}; |
| 73 | if (!syncpt_interrupts[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 = syncpt_interrupts[syncpoint_id].begin(); | 75 | auto it = syncpt_interrupts[syncpoint_id].begin(); |
| @@ -82,7 +82,6 @@ void GPU::IncrementSyncPoint(const u32 syncpoint_id) { | |||
| 82 | it++; | 82 | it++; |
| 83 | } | 83 | } |
| 84 | } | 84 | } |
| 85 | sync_mutex.unlock(); | ||
| 86 | } | 85 | } |
| 87 | 86 | ||
| 88 | u32 GPU::GetSyncpointValue(const u32 syncpoint_id) const { | 87 | u32 GPU::GetSyncpointValue(const u32 syncpoint_id) const { |
| @@ -98,7 +97,7 @@ void GPU::RegisterSyncptInterrupt(const u32 syncpoint_id, const u32 value) { | |||
| 98 | } | 97 | } |
| 99 | 98 | ||
| 100 | bool GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) { | 99 | bool GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) { |
| 101 | sync_mutex.lock(); | 100 | std::lock_guard lock{sync_mutex}; |
| 102 | auto it = syncpt_interrupts[syncpoint_id].begin(); | 101 | auto it = syncpt_interrupts[syncpoint_id].begin(); |
| 103 | while (it != syncpt_interrupts[syncpoint_id].end()) { | 102 | while (it != syncpt_interrupts[syncpoint_id].end()) { |
| 104 | if (value == *it) { | 103 | if (value == *it) { |
| @@ -108,7 +107,6 @@ bool GPU::CancelSyncptInterrupt(const u32 syncpoint_id, const u32 value) { | |||
| 108 | it++; | 107 | it++; |
| 109 | } | 108 | } |
| 110 | return false; | 109 | return false; |
| 111 | sync_mutex.unlock(); | ||
| 112 | } | 110 | } |
| 113 | 111 | ||
| 114 | u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { | 112 | u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { |