diff options
| author | 2021-11-05 15:52:31 +0100 | |
|---|---|---|
| committer | 2022-10-06 21:00:51 +0200 | |
| commit | 139ea93512aeead8a4aee3910a3de86eb109a838 (patch) | |
| tree | 857643fc08617b7035656a51728c399f30c8c2cb /src/video_core/dma_pusher.cpp | |
| parent | NVASGPU: Fix Remap. (diff) | |
| download | yuzu-139ea93512aeead8a4aee3910a3de86eb109a838.tar.gz yuzu-139ea93512aeead8a4aee3910a3de86eb109a838.tar.xz yuzu-139ea93512aeead8a4aee3910a3de86eb109a838.zip | |
VideoCore: implement channels on gpu caches.
Diffstat (limited to 'src/video_core/dma_pusher.cpp')
| -rw-r--r-- | src/video_core/dma_pusher.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp index 29b8582ab..b01f04d0c 100644 --- a/src/video_core/dma_pusher.cpp +++ b/src/video_core/dma_pusher.cpp | |||
| @@ -12,7 +12,10 @@ | |||
| 12 | 12 | ||
| 13 | namespace Tegra { | 13 | namespace Tegra { |
| 14 | 14 | ||
| 15 | DmaPusher::DmaPusher(Core::System& system_, GPU& gpu_) : gpu{gpu_}, system{system_} {} | 15 | DmaPusher::DmaPusher(Core::System& system_, GPU& gpu_, MemoryManager& memory_manager_, |
| 16 | Control::ChannelState& channel_state_) | ||
| 17 | : gpu{gpu_}, system{system_}, memory_manager{memory_manager_}, puller{gpu_, memory_manager_, | ||
| 18 | *this, channel_state_} {} | ||
| 16 | 19 | ||
| 17 | DmaPusher::~DmaPusher() = default; | 20 | DmaPusher::~DmaPusher() = default; |
| 18 | 21 | ||
| @@ -76,11 +79,11 @@ bool DmaPusher::Step() { | |||
| 76 | // Push buffer non-empty, read a word | 79 | // Push buffer non-empty, read a word |
| 77 | command_headers.resize(command_list_header.size); | 80 | command_headers.resize(command_list_header.size); |
| 78 | if (Settings::IsGPULevelHigh()) { | 81 | if (Settings::IsGPULevelHigh()) { |
| 79 | gpu.MemoryManager().ReadBlock(dma_get, command_headers.data(), | 82 | memory_manager.ReadBlock(dma_get, command_headers.data(), |
| 80 | command_list_header.size * sizeof(u32)); | 83 | command_list_header.size * sizeof(u32)); |
| 81 | } else { | 84 | } else { |
| 82 | gpu.MemoryManager().ReadBlockUnsafe(dma_get, command_headers.data(), | 85 | memory_manager.ReadBlockUnsafe(dma_get, command_headers.data(), |
| 83 | command_list_header.size * sizeof(u32)); | 86 | command_list_header.size * sizeof(u32)); |
| 84 | } | 87 | } |
| 85 | } | 88 | } |
| 86 | for (std::size_t index = 0; index < command_headers.size();) { | 89 | for (std::size_t index = 0; index < command_headers.size();) { |
| @@ -154,7 +157,7 @@ void DmaPusher::SetState(const CommandHeader& command_header) { | |||
| 154 | 157 | ||
| 155 | void DmaPusher::CallMethod(u32 argument) const { | 158 | void DmaPusher::CallMethod(u32 argument) const { |
| 156 | if (dma_state.method < non_puller_methods) { | 159 | if (dma_state.method < non_puller_methods) { |
| 157 | gpu.CallMethod(GPU::MethodCall{ | 160 | puller.CallPullerMethod(Engines::Puller::MethodCall{ |
| 158 | dma_state.method, | 161 | dma_state.method, |
| 159 | argument, | 162 | argument, |
| 160 | dma_state.subchannel, | 163 | dma_state.subchannel, |
| @@ -168,12 +171,16 @@ void DmaPusher::CallMethod(u32 argument) const { | |||
| 168 | 171 | ||
| 169 | void DmaPusher::CallMultiMethod(const u32* base_start, u32 num_methods) const { | 172 | void DmaPusher::CallMultiMethod(const u32* base_start, u32 num_methods) const { |
| 170 | if (dma_state.method < non_puller_methods) { | 173 | if (dma_state.method < non_puller_methods) { |
| 171 | gpu.CallMultiMethod(dma_state.method, dma_state.subchannel, base_start, num_methods, | 174 | puller.CallMultiMethod(dma_state.method, dma_state.subchannel, base_start, num_methods, |
| 172 | dma_state.method_count); | 175 | dma_state.method_count); |
| 173 | } else { | 176 | } else { |
| 174 | subchannels[dma_state.subchannel]->CallMultiMethod(dma_state.method, base_start, | 177 | subchannels[dma_state.subchannel]->CallMultiMethod(dma_state.method, base_start, |
| 175 | num_methods, dma_state.method_count); | 178 | num_methods, dma_state.method_count); |
| 176 | } | 179 | } |
| 177 | } | 180 | } |
| 178 | 181 | ||
| 182 | void DmaPusher::BindRasterizer(VideoCore::RasterizerInterface* rasterizer) { | ||
| 183 | puller.BindRasterizer(rasterizer); | ||
| 184 | } | ||
| 185 | |||
| 179 | } // namespace Tegra | 186 | } // namespace Tegra |