diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-24 05:20:56 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-11-27 05:14:01 +0100 |
commit | abea6fa90c901d0b47487ed38d44511b18f0addf (patch) | |
tree | 65ba9fc6ff7609ea569ea1e3d05f91caa56ffa14 /src/video_core/gpu.h | |
parent | Merge pull request #1805 from lioncash/resource (diff) | |
download | yuzu-abea6fa90c901d0b47487ed38d44511b18f0addf.tar yuzu-abea6fa90c901d0b47487ed38d44511b18f0addf.tar.gz yuzu-abea6fa90c901d0b47487ed38d44511b18f0addf.tar.bz2 yuzu-abea6fa90c901d0b47487ed38d44511b18f0addf.tar.lz yuzu-abea6fa90c901d0b47487ed38d44511b18f0addf.tar.xz yuzu-abea6fa90c901d0b47487ed38d44511b18f0addf.tar.zst yuzu-abea6fa90c901d0b47487ed38d44511b18f0addf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/gpu.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 5cc1e19ca..af5ccd1e9 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -9,6 +9,7 @@ #include <vector> #include "common/common_types.h" #include "core/hle/service/nvflinger/buffer_queue.h" +#include "video_core/dma_pusher.h" #include "video_core/memory_manager.h" namespace VideoCore { @@ -119,8 +120,23 @@ public: explicit GPU(VideoCore::RasterizerInterface& rasterizer); ~GPU(); - /// Processes a command list stored at the specified address in GPU memory. - void ProcessCommandLists(const std::vector<CommandListHeader>& commands); + struct MethodCall { + u32 method{}; + u32 argument{}; + u32 subchannel{}; + u32 method_count{}; + + bool IsLastCall() const { + return method_count <= 1; + } + + MethodCall(u32 method, u32 argument, u32 subchannel = 0, u32 method_count = 0) + : method(method), argument(argument), subchannel(subchannel), + method_count(method_count) {} + }; + + /// Calls a GPU method. + void CallMethod(const MethodCall& method_call); /// Returns a reference to the Maxwell3D GPU engine. Engines::Maxwell3D& Maxwell3D(); @@ -134,7 +150,14 @@ public: /// Returns a const reference to the GPU memory manager. const Tegra::MemoryManager& MemoryManager() const; + /// Returns a reference to the GPU DMA pusher. + Tegra::DmaPusher& DmaPusher(); + + /// Returns a const reference to the GPU DMA pusher. + const Tegra::DmaPusher& DmaPusher() const; + private: + std::unique_ptr<Tegra::DmaPusher> dma_pusher; std::unique_ptr<Tegra::MemoryManager> memory_manager; /// Mapping of command subchannels to their bound engine ids. |