diff options
author | Chloe <25727384+ogniK5377@users.noreply.github.com> | 2020-11-04 08:36:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 08:36:55 +0100 |
commit | 6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1 (patch) | |
tree | a97a13d00eaae7e81f028a57fef7dadf9d96a27c /src/video_core/gpu.h | |
parent | Merge pull request #4874 from lioncash/nodiscard2 (diff) | |
parent | fixup! hle service: nvdrv: nvhost_gpu: Update to use SyncpointManager and other improvements. (diff) | |
download | yuzu-6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1.tar yuzu-6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1.tar.gz yuzu-6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1.tar.bz2 yuzu-6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1.tar.lz yuzu-6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1.tar.xz yuzu-6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1.tar.zst yuzu-6bbbbe8f85369dfc7a67441e5f7f6ab7a6484ae1.zip |
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r-- | src/video_core/gpu.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index b8c613b11..5444b49f3 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -263,6 +263,24 @@ public: return use_nvdec; } + enum class FenceOperation : u32 { + Acquire = 0, + Increment = 1, + }; + + union FenceAction { + u32 raw; + BitField<0, 1, FenceOperation> op; + BitField<8, 24, u32> syncpoint_id; + + static constexpr CommandHeader Build(FenceOperation op, u32 syncpoint_id) { + FenceAction result{}; + result.op.Assign(op); + result.syncpoint_id.Assign(syncpoint_id); + return {result.raw}; + } + }; + struct Regs { static constexpr size_t NUM_REGS = 0x40; @@ -291,10 +309,7 @@ public: u32 semaphore_acquire; u32 semaphore_release; u32 fence_value; - union { - BitField<4, 4, u32> operation; - BitField<8, 8, u32> id; - } fence_action; + FenceAction fence_action; INSERT_UNION_PADDING_WORDS(0xE2); // Puller state @@ -342,6 +357,8 @@ protected: private: void ProcessBindMethod(const MethodCall& method_call); + void ProcessFenceActionMethod(); + void ProcessWaitForInterruptMethod(); void ProcessSemaphoreTriggerMethod(); void ProcessSemaphoreRelease(); void ProcessSemaphoreAcquire(); |