summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-08 22:45:25 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-05 21:49:18 +0200
commitc13433aee4032ce654de1db31a93e4aed578596f (patch)
tree3e967b11b147323ec848ec8073b944c1a8493af1 /src/video_core
parentnvhost_ctrl: Corrections to event handling (diff)
downloadyuzu-c13433aee4032ce654de1db31a93e4aed578596f.tar
yuzu-c13433aee4032ce654de1db31a93e4aed578596f.tar.gz
yuzu-c13433aee4032ce654de1db31a93e4aed578596f.tar.bz2
yuzu-c13433aee4032ce654de1db31a93e4aed578596f.tar.lz
yuzu-c13433aee4032ce654de1db31a93e4aed578596f.tar.xz
yuzu-c13433aee4032ce654de1db31a93e4aed578596f.tar.zst
yuzu-c13433aee4032ce654de1db31a93e4aed578596f.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu.cpp4
-rw-r--r--src/video_core/gpu.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index ee976f81f..c71f0f9bf 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -69,7 +69,7 @@ const DmaPusher& GPU::DmaPusher() const {
void GPU::IncrementSyncPoint(const u32 syncpoint_id) {
syncpoints[syncpoint_id]++;
- sync_guard.lock();
+ sync_mutex.lock();
if (!events[syncpoint_id].empty()) {
u32 value = syncpoints[syncpoint_id].load();
auto it = events[syncpoint_id].begin();
@@ -82,7 +82,7 @@ void GPU::IncrementSyncPoint(const u32 syncpoint_id) {
it++;
}
}
- sync_guard.unlock();
+ sync_mutex.unlock();
}
u32 GPU::GetSyncpointValue(const u32 syncpoint_id) const {
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index bc63920f2..ab1a4bdd4 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -8,11 +8,11 @@
#include <atomic>
#include <list>
#include <memory>
+#include <mutex>
#include "common/common_types.h"
#include "core/hle/service/nvdrv/nvdata.h"
#include "core/hle/service/nvflinger/buffer_queue.h"
#include "video_core/dma_pusher.h"
-#include "common/spin_lock.h"
using CacheAddr = std::uintptr_t;
inline CacheAddr ToCacheAddr(const void* host_ptr) {
@@ -178,9 +178,9 @@ public:
void Guard(bool guard_set) {
if (guard_set) {
- sync_guard.lock();
+ sync_mutex.lock();
} else {
- sync_guard.unlock();
+ sync_mutex.unlock();
}
}
@@ -297,7 +297,7 @@ private:
std::array<std::list<Event>, Service::Nvidia::MaxSyncPoints> events;
- Common::SpinLock sync_guard{};
+ std::mutex sync_mutex;
};
#define ASSERT_REG_POSITION(field_name, position) \