summaryrefslogtreecommitdiff
path: root/src/video_core/dma_pusher.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2020-05-05 17:12:42 -0400
committerGravatar GitHub2020-05-05 17:12:42 -0400
commit41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa (patch)
tree64c61fda0aaa076cd54c46e8c271e67888c79c61 /src/video_core/dma_pusher.cpp
parentMerge pull request #3881 from lioncash/mem-warning (diff)
parentUpdate src/video_core/gpu.cpp (diff)
downloadyuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar.gz
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar.xz
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.zip
Merge pull request #3815 from FernandoS27/command-list-2
GPU: More optimizations to GPU Command List Processing and DMA Copy Optimizations
Diffstat (limited to 'src/video_core/dma_pusher.cpp')
-rw-r--r--src/video_core/dma_pusher.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp
index 16311f05e..bdc023d54 100644
--- a/src/video_core/dma_pusher.cpp
+++ b/src/video_core/dma_pusher.cpp
@@ -27,6 +27,8 @@ void DmaPusher::DispatchCalls() {
27 27
28 dma_pushbuffer_subindex = 0; 28 dma_pushbuffer_subindex = 0;
29 29
30 dma_state.is_last_call = true;
31
30 while (system.IsPoweredOn()) { 32 while (system.IsPoweredOn()) {
31 if (!Step()) { 33 if (!Step()) {
32 break; 34 break;
@@ -82,9 +84,11 @@ bool DmaPusher::Step() {
82 index); 84 index);
83 CallMultiMethod(&command_header.argument, max_write); 85 CallMultiMethod(&command_header.argument, max_write);
84 dma_state.method_count -= max_write; 86 dma_state.method_count -= max_write;
87 dma_state.is_last_call = true;
85 index += max_write; 88 index += max_write;
86 continue; 89 continue;
87 } else { 90 } else {
91 dma_state.is_last_call = dma_state.method_count <= 1;
88 CallMethod(command_header.argument); 92 CallMethod(command_header.argument);
89 } 93 }
90 94
@@ -144,12 +148,22 @@ void DmaPusher::SetState(const CommandHeader& command_header) {
144} 148}
145 149
146void DmaPusher::CallMethod(u32 argument) const { 150void DmaPusher::CallMethod(u32 argument) const {
147 gpu.CallMethod({dma_state.method, argument, dma_state.subchannel, dma_state.method_count}); 151 if (dma_state.method < non_puller_methods) {
152 gpu.CallMethod({dma_state.method, argument, dma_state.subchannel, dma_state.method_count});
153 } else {
154 subchannels[dma_state.subchannel]->CallMethod(dma_state.method, argument,
155 dma_state.is_last_call);
156 }
148} 157}
149 158
150void DmaPusher::CallMultiMethod(const u32* base_start, u32 num_methods) const { 159void DmaPusher::CallMultiMethod(const u32* base_start, u32 num_methods) const {
151 gpu.CallMultiMethod(dma_state.method, dma_state.subchannel, base_start, num_methods, 160 if (dma_state.method < non_puller_methods) {
152 dma_state.method_count); 161 gpu.CallMultiMethod(dma_state.method, dma_state.subchannel, base_start, num_methods,
162 dma_state.method_count);
163 } else {
164 subchannels[dma_state.subchannel]->CallMultiMethod(dma_state.method, base_start,
165 num_methods, dma_state.method_count);
166 }
153} 167}
154 168
155} // namespace Tegra 169} // namespace Tegra