summaryrefslogtreecommitdiff
path: root/src/video_core/macro_interpreter.cpp
diff options
context:
space:
mode:
authorGravatar Nguyen Dac Nam2020-03-22 10:38:24 +0700
committerGravatar namkazy2020-03-22 10:53:41 +0700
commit01af036c1f653e3e25ab270d3b2a3e33849da0fd (patch)
treef952cf6284473ca7f2ade5ea850d610f53f8b094 /src/video_core/macro_interpreter.cpp
parentmaxwell_3d: track shadow ram ctrl and hw reg value (diff)
downloadyuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar.gz
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar.xz
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.zip
marco_interpreter: write hw value when shadow ram requested
Diffstat (limited to 'src/video_core/macro_interpreter.cpp')
-rw-r--r--src/video_core/macro_interpreter.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/macro_interpreter.cpp b/src/video_core/macro_interpreter.cpp
index 42031d80a..181310606 100644
--- a/src/video_core/macro_interpreter.cpp
+++ b/src/video_core/macro_interpreter.cpp
@@ -328,6 +328,12 @@ void MacroInterpreter::SetMethodAddress(u32 address) {
328} 328}
329 329
330void MacroInterpreter::Send(u32 value) { 330void MacroInterpreter::Send(u32 value) {
331 // Use the tracked value in shadow_regs when requested.
332 if (method_address.address < Engines::Maxwell3D::Regs::NUM_REGS &&
333 maxwell3d.shadow_state.shadow_ram_control ==
334 Engines::Maxwell3D::Regs::ShadowRamControl::Replay) {
335 value = maxwell3d.shadow_state.reg_array[method_address.address];
336 }
331 maxwell3d.CallMethodFromMME({method_address.address, value}); 337 maxwell3d.CallMethodFromMME({method_address.address, value});
332 // Increment the method address by the method increment. 338 // Increment the method address by the method increment.
333 method_address.address.Assign(method_address.address.Value() + 339 method_address.address.Assign(method_address.address.Value() +