diff options
author | namkazy <nam.kazt.91@gmail.com> | 2020-03-22 16:25:44 +0100 |
---|---|---|
committer | namkazy <nam.kazt.91@gmail.com> | 2020-03-22 16:25:44 +0100 |
commit | fc37672f26a6f5fb7e09874b0463682c0acf3ca5 (patch) | |
tree | f13f4bc7a75c6ef8ba9c68e2c61f6b42cac98996 /src/video_core | |
parent | maxwell_3d: change declaration order (diff) | |
download | yuzu-fc37672f26a6f5fb7e09874b0463682c0acf3ca5.tar yuzu-fc37672f26a6f5fb7e09874b0463682c0acf3ca5.tar.gz yuzu-fc37672f26a6f5fb7e09874b0463682c0acf3ca5.tar.bz2 yuzu-fc37672f26a6f5fb7e09874b0463682c0acf3ca5.tar.lz yuzu-fc37672f26a6f5fb7e09874b0463682c0acf3ca5.tar.xz yuzu-fc37672f26a6f5fb7e09874b0463682c0acf3ca5.tar.zst yuzu-fc37672f26a6f5fb7e09874b0463682c0acf3ca5.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 15 | ||||
-rw-r--r-- | src/video_core/macro_interpreter.cpp | 6 |
2 files changed, 9 insertions, 12 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 4e4373ad9..ba63b44b4 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp @@ -162,14 +162,17 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { ASSERT_MSG(method < Regs::NUM_REGS, "Invalid Maxwell3D register, increase the size of the Regs structure"); + u32 arg = method_call.argument; // Keep track of the register value in shadow_state when requested. if (shadow_state.shadow_ram_control == Regs::ShadowRamControl::Track || shadow_state.shadow_ram_control == Regs::ShadowRamControl::TrackWithFilter) { - shadow_state.reg_array[method] = method_call.argument; + shadow_state.reg_array[method] = arg; + } else if (shadow_state.shadow_ram_control == Regs::ShadowRamControl::Replay) { + arg = shadow_state.reg_array[method]; } - if (regs.reg_array[method] != method_call.argument) { - regs.reg_array[method] = method_call.argument; + if (regs.reg_array[method] != arg) { + regs.reg_array[method] = arg; for (const auto& table : dirty.tables) { dirty.flags[table[method]] = true; @@ -182,11 +185,11 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { break; } case MAXWELL3D_REG_INDEX(macros.data): { - ProcessMacroUpload(method_call.argument); + ProcessMacroUpload(arg); break; } case MAXWELL3D_REG_INDEX(macros.bind): { - ProcessMacroBind(method_call.argument); + ProcessMacroBind(arg); break; } case MAXWELL3D_REG_INDEX(firmware[4]): { @@ -262,7 +265,7 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { } case MAXWELL3D_REG_INDEX(data_upload): { const bool is_last_call = method_call.IsLastCall(); - upload_state.ProcessData(method_call.argument, is_last_call); + upload_state.ProcessData(arg, is_last_call); if (is_last_call) { OnMemoryWrite(); } diff --git a/src/video_core/macro_interpreter.cpp b/src/video_core/macro_interpreter.cpp index 861144c87..42031d80a 100644 --- a/src/video_core/macro_interpreter.cpp +++ b/src/video_core/macro_interpreter.cpp @@ -328,12 +328,6 @@ void MacroInterpreter::SetMethodAddress(u32 address) { } void MacroInterpreter::Send(u32 value) { - // Use the tracked value in shadow_state when requested. - if (method_address.address < Engines::Maxwell3D::Regs::NUM_REGS && - maxwell3d.shadow_state.shadow_ram_control == - Engines::Maxwell3D::Regs::ShadowRamControl::Replay) { - value = maxwell3d.shadow_state.reg_array[method_address.address]; - } maxwell3d.CallMethodFromMME({method_address.address, value}); // Increment the method address by the method increment. method_address.address.Assign(method_address.address.Value() + |