summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-08 04:13:40 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-07-05 21:49:16 +0200
commiteef55f493b636bfc57389e9c541ddf2c39f6f826 (patch)
treedb7e0db06edb8dc80b67b111b4fdb06d464a1eb5 /src/video_core/gpu.h
parentnv_services: Stub CtrlEventSignal (diff)
downloadyuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar
yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.gz
yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.bz2
yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.lz
yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.xz
yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.tar.zst
yuzu-eef55f493b636bfc57389e9c541ddf2c39f6f826.zip
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 4805a5fbc..bc63920f2 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -12,6 +12,7 @@
#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) {
@@ -175,6 +176,14 @@ public:
void CancelEvent(const u32 event_id, const u32 syncpoint_id, const u32 value);
+ void Guard(bool guard_set) {
+ if (guard_set) {
+ sync_guard.lock();
+ } else {
+ sync_guard.unlock();
+ }
+ }
+
/// Returns a const reference to the GPU DMA pusher.
const Tegra::DmaPusher& DmaPusher() const;
@@ -287,6 +296,8 @@ private:
};
std::array<std::list<Event>, Service::Nvidia::MaxSyncPoints> events;
+
+ Common::SpinLock sync_guard{};
};
#define ASSERT_REG_POSITION(field_name, position) \