diff options
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/dma_pusher.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/dma_pusher.h | 11 | ||||
| -rw-r--r-- | src/video_core/gpu.cpp | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp index 713c14182..0b77afc71 100644 --- a/src/video_core/dma_pusher.cpp +++ b/src/video_core/dma_pusher.cpp | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | 12 | ||
| 13 | namespace Tegra { | 13 | namespace Tegra { |
| 14 | 14 | ||
| 15 | DmaPusher::DmaPusher(GPU& gpu) : gpu(gpu) {} | 15 | DmaPusher::DmaPusher(Core::System& system, GPU& gpu) : gpu{gpu}, system{system} {} |
| 16 | 16 | ||
| 17 | DmaPusher::~DmaPusher() = default; | 17 | DmaPusher::~DmaPusher() = default; |
| 18 | 18 | ||
| @@ -26,7 +26,7 @@ void DmaPusher::DispatchCalls() { | |||
| 26 | 26 | ||
| 27 | dma_pushbuffer_subindex = 0; | 27 | dma_pushbuffer_subindex = 0; |
| 28 | 28 | ||
| 29 | while (Core::System::GetInstance().IsPoweredOn()) { | 29 | while (system.IsPoweredOn()) { |
| 30 | if (!Step()) { | 30 | if (!Step()) { |
| 31 | break; | 31 | break; |
| 32 | } | 32 | } |
diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h index 6ab06518f..d6188614a 100644 --- a/src/video_core/dma_pusher.h +++ b/src/video_core/dma_pusher.h | |||
| @@ -10,6 +10,10 @@ | |||
| 10 | #include "common/bit_field.h" | 10 | #include "common/bit_field.h" |
| 11 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 12 | 12 | ||
| 13 | namespace Core { | ||
| 14 | class System; | ||
| 15 | } | ||
| 16 | |||
| 13 | namespace Tegra { | 17 | namespace Tegra { |
| 14 | 18 | ||
| 15 | enum class SubmissionMode : u32 { | 19 | enum class SubmissionMode : u32 { |
| @@ -56,7 +60,7 @@ using CommandList = std::vector<Tegra::CommandListHeader>; | |||
| 56 | */ | 60 | */ |
| 57 | class DmaPusher { | 61 | class DmaPusher { |
| 58 | public: | 62 | public: |
| 59 | explicit DmaPusher(GPU& gpu); | 63 | explicit DmaPusher(Core::System& system, GPU& gpu); |
| 60 | ~DmaPusher(); | 64 | ~DmaPusher(); |
| 61 | 65 | ||
| 62 | void Push(CommandList&& entries) { | 66 | void Push(CommandList&& entries) { |
| @@ -72,8 +76,6 @@ private: | |||
| 72 | 76 | ||
| 73 | void CallMethod(u32 argument) const; | 77 | void CallMethod(u32 argument) const; |
| 74 | 78 | ||
| 75 | GPU& gpu; | ||
| 76 | |||
| 77 | std::vector<CommandHeader> command_headers; ///< Buffer for list of commands fetched at once | 79 | std::vector<CommandHeader> command_headers; ///< Buffer for list of commands fetched at once |
| 78 | 80 | ||
| 79 | std::queue<CommandList> dma_pushbuffer; ///< Queue of command lists to be processed | 81 | std::queue<CommandList> dma_pushbuffer; ///< Queue of command lists to be processed |
| @@ -92,6 +94,9 @@ private: | |||
| 92 | 94 | ||
| 93 | GPUVAddr dma_mget{}; ///< main pushbuffer last read address | 95 | GPUVAddr dma_mget{}; ///< main pushbuffer last read address |
| 94 | bool ib_enable{true}; ///< IB mode enabled | 96 | bool ib_enable{true}; ///< IB mode enabled |
| 97 | |||
| 98 | GPU& gpu; | ||
| 99 | Core::System& system; | ||
| 95 | }; | 100 | }; |
| 96 | 101 | ||
| 97 | } // namespace Tegra | 102 | } // namespace Tegra |
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 8acf2eda2..a606f4abd 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -27,7 +27,7 @@ GPU::GPU(Core::System& system, std::unique_ptr<VideoCore::RendererBase>&& render | |||
| 27 | : system{system}, renderer{std::move(renderer_)}, is_async{is_async} { | 27 | : system{system}, renderer{std::move(renderer_)}, is_async{is_async} { |
| 28 | auto& rasterizer{renderer->Rasterizer()}; | 28 | auto& rasterizer{renderer->Rasterizer()}; |
| 29 | memory_manager = std::make_unique<Tegra::MemoryManager>(system, rasterizer); | 29 | memory_manager = std::make_unique<Tegra::MemoryManager>(system, rasterizer); |
| 30 | dma_pusher = std::make_unique<Tegra::DmaPusher>(*this); | 30 | dma_pusher = std::make_unique<Tegra::DmaPusher>(system, *this); |
| 31 | maxwell_3d = std::make_unique<Engines::Maxwell3D>(system, rasterizer, *memory_manager); | 31 | maxwell_3d = std::make_unique<Engines::Maxwell3D>(system, rasterizer, *memory_manager); |
| 32 | fermi_2d = std::make_unique<Engines::Fermi2D>(rasterizer); | 32 | fermi_2d = std::make_unique<Engines::Fermi2D>(rasterizer); |
| 33 | kepler_compute = std::make_unique<Engines::KeplerCompute>(system, rasterizer, *memory_manager); | 33 | kepler_compute = std::make_unique<Engines::KeplerCompute>(system, rasterizer, *memory_manager); |