aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/engines/kepler_memory.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-05 17:12:42 -0400
committerGitHub <noreply@github.com>2020-05-05 17:12:42 -0400
commit41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa (patch)
tree64c61fda0aaa076cd54c46e8c271e67888c79c61 /src/video_core/engines/kepler_memory.cpp
parent88141bb2d44f26d1015be2cd832284bf322bc3b2 (diff)
parenteb2c50c5e692e13608c1d354473c3b22277c687e (diff)
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/engines/kepler_memory.cpp')
-rw-r--r--src/video_core/engines/kepler_memory.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/video_core/engines/kepler_memory.cpp b/src/video_core/engines/kepler_memory.cpp
index 586ff15dc..dc71b2eec 100644
--- a/src/video_core/engines/kepler_memory.cpp
+++ b/src/video_core/engines/kepler_memory.cpp
@@ -19,20 +19,19 @@ KeplerMemory::KeplerMemory(Core::System& system, MemoryManager& memory_manager)
KeplerMemory::~KeplerMemory() = default;
-void KeplerMemory::CallMethod(const GPU::MethodCall& method_call) {
- ASSERT_MSG(method_call.method < Regs::NUM_REGS,
+void KeplerMemory::CallMethod(u32 method, u32 method_argument, bool is_last_call) {
+ ASSERT_MSG(method < Regs::NUM_REGS,
"Invalid KeplerMemory register, increase the size of the Regs structure");
- regs.reg_array[method_call.method] = method_call.argument;
+ regs.reg_array[method] = method_argument;
- switch (method_call.method) {
+ switch (method) {
case KEPLERMEMORY_REG_INDEX(exec): {
upload_state.ProcessExec(regs.exec.linear != 0);
break;
}
case KEPLERMEMORY_REG_INDEX(data): {
- const bool is_last_call = method_call.IsLastCall();
- upload_state.ProcessData(method_call.argument, is_last_call);
+ upload_state.ProcessData(method_argument, is_last_call);
if (is_last_call) {
system.GPU().Maxwell3D().OnMemoryWrite();
}
@@ -44,7 +43,7 @@ void KeplerMemory::CallMethod(const GPU::MethodCall& method_call) {
void KeplerMemory::CallMultiMethod(u32 method, const u32* base_start, u32 amount,
u32 methods_pending) {
for (std::size_t i = 0; i < amount; i++) {
- CallMethod({method, base_start[i], 0, methods_pending - static_cast<u32>(i)});
+ CallMethod(method, base_start[i], methods_pending - static_cast<u32>(i) <= 1);
}
}