diff options
author | bunnei <bunneidev@gmail.com> | 2020-10-27 06:11:41 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2020-11-01 09:52:37 +0100 |
commit | 6053b955525be69eb73a928a7bdd43ba8f5e69a7 (patch) | |
tree | f8eefbf7ed0b45a83d9336cfe5c15ba2da7b6082 /src/video_core/gpu.h | |
parent | hle service: nvdrv: nvhost_ctrl: Update to use SyncpointManager. (diff) | |
download | yuzu-6053b955525be69eb73a928a7bdd43ba8f5e69a7.tar yuzu-6053b955525be69eb73a928a7bdd43ba8f5e69a7.tar.gz yuzu-6053b955525be69eb73a928a7bdd43ba8f5e69a7.tar.bz2 yuzu-6053b955525be69eb73a928a7bdd43ba8f5e69a7.tar.lz yuzu-6053b955525be69eb73a928a7bdd43ba8f5e69a7.tar.xz yuzu-6053b955525be69eb73a928a7bdd43ba8f5e69a7.tar.zst yuzu-6053b955525be69eb73a928a7bdd43ba8f5e69a7.zip |
Diffstat (limited to '')
-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(); |