summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNguyen Dac Nam <nam.kazt.91@gmail.com>2020-03-22 04:38:24 +0100
committernamkazy <nam.kazt.91@gmail.com>2020-03-22 04:53:41 +0100
commit01af036c1f653e3e25ab270d3b2a3e33849da0fd (patch)
treef952cf6284473ca7f2ade5ea850d610f53f8b094
parentmaxwell_3d: track shadow ram ctrl and hw reg value (diff)
downloadyuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar.gz
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar.bz2
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar.lz
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar.xz
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.tar.zst
yuzu-01af036c1f653e3e25ab270d3b2a3e33849da0fd.zip
-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) {
}
void MacroInterpreter::Send(u32 value) {
+ // Use the tracked value in shadow_regs 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() +