diff options
| author | 2020-03-22 10:36:33 +0700 | |
|---|---|---|
| committer | 2020-03-22 10:53:41 +0700 | |
| commit | 63c2635e6fa3bcbff000cab7483cb94616db959e (patch) | |
| tree | a5ad00decbad04d6249d5f23866bc39242442d0d | |
| parent | maxwell_3d: implement MME shadow RAM (diff) | |
| download | yuzu-63c2635e6fa3bcbff000cab7483cb94616db959e.tar.gz yuzu-63c2635e6fa3bcbff000cab7483cb94616db959e.tar.xz yuzu-63c2635e6fa3bcbff000cab7483cb94616db959e.zip | |
maxwell_3d: track shadow ram ctrl and hw reg value
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index ce536e29b..96cbe374c 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -160,6 +160,12 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { | |||
| 160 | ASSERT_MSG(method < Regs::NUM_REGS, | 160 | ASSERT_MSG(method < Regs::NUM_REGS, |
| 161 | "Invalid Maxwell3D register, increase the size of the Regs structure"); | 161 | "Invalid Maxwell3D register, increase the size of the Regs structure"); |
| 162 | 162 | ||
| 163 | // Keep track of the register value in shadow_regs when requested. | ||
| 164 | if (regs.shadow_ram_control == Regs::ShadowRamControl::Track || | ||
| 165 | regs.shadow_ram_control == Regs::ShadowRamControl::TrackWithFilter) { | ||
| 166 | shadow_state.reg_array[method] = method_call.argument; | ||
| 167 | } | ||
| 168 | |||
| 163 | if (regs.reg_array[method] != method_call.argument) { | 169 | if (regs.reg_array[method] != method_call.argument) { |
| 164 | regs.reg_array[method] = method_call.argument; | 170 | regs.reg_array[method] = method_call.argument; |
| 165 | 171 | ||
| @@ -169,6 +175,10 @@ void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) { | |||
| 169 | } | 175 | } |
| 170 | 176 | ||
| 171 | switch (method) { | 177 | switch (method) { |
| 178 | case MAXWELL3D_REG_INDEX(shadow_ram_control): { | ||
| 179 | shadow_state.shadow_ram_control = static_cast<Regs::ShadowRamControl>(method_call.argument); | ||
| 180 | break; | ||
| 181 | } | ||
| 172 | case MAXWELL3D_REG_INDEX(macros.data): { | 182 | case MAXWELL3D_REG_INDEX(macros.data): { |
| 173 | ProcessMacroUpload(method_call.argument); | 183 | ProcessMacroUpload(method_call.argument); |
| 174 | break; | 184 | break; |