summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar namkazy2020-03-22 11:35:26 +0700
committerGravatar namkazy2020-03-22 11:35:26 +0700
commit7051dc19020c4cc510e5ae0b490d037ae1ad9bfe (patch)
tree19371ffffa3f3e73a519bfce16415bd9480d9bdf /src
parentmarco_interpreter: write hw value when shadow ram requested (diff)
downloadyuzu-7051dc19020c4cc510e5ae0b490d037ae1ad9bfe.tar.gz
yuzu-7051dc19020c4cc510e5ae0b490d037ae1ad9bfe.tar.xz
yuzu-7051dc19020c4cc510e5ae0b490d037ae1ad9bfe.zip
maxwell_3d: update comments for shadow ram usage
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp2
-rw-r--r--src/video_core/engines/maxwell_3d.h4
-rw-r--r--src/video_core/macro_interpreter.cpp2
3 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 96cbe374c..7a3e21c6b 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -160,7 +160,7 @@ 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. 163 // Keep track of the register value in shadow_state when requested.
164 if (regs.shadow_ram_control == Regs::ShadowRamControl::Track || 164 if (regs.shadow_ram_control == Regs::ShadowRamControl::Track ||
165 regs.shadow_ram_control == Regs::ShadowRamControl::TrackWithFilter) { 165 regs.shadow_ram_control == Regs::ShadowRamControl::TrackWithFilter) {
166 shadow_state.reg_array[method] = method_call.argument; 166 shadow_state.reg_array[method] = method_call.argument;
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index 5e531e21b..17119beda 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -532,9 +532,13 @@ public:
532 }; 532 };
533 533
534 enum class ShadowRamControl : u32 { 534 enum class ShadowRamControl : u32 {
535 // write value to shadow ram
535 Track = 0, 536 Track = 0,
537 // write value to shadow ram ( with validation ??? )
536 TrackWithFilter = 1, 538 TrackWithFilter = 1,
539 // only write to real hw register
537 Passthrough = 2, 540 Passthrough = 2,
541 // write value from shadow ram to real hw register
538 Replay = 3, 542 Replay = 3,
539 }; 543 };
540 544
diff --git a/src/video_core/macro_interpreter.cpp b/src/video_core/macro_interpreter.cpp
index 181310606..861144c87 100644
--- a/src/video_core/macro_interpreter.cpp
+++ b/src/video_core/macro_interpreter.cpp
@@ -328,7 +328,7 @@ 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. 331 // Use the tracked value in shadow_state when requested.
332 if (method_address.address < Engines::Maxwell3D::Regs::NUM_REGS && 332 if (method_address.address < Engines::Maxwell3D::Regs::NUM_REGS &&
333 maxwell3d.shadow_state.shadow_ram_control == 333 maxwell3d.shadow_state.shadow_ram_control ==
334 Engines::Maxwell3D::Regs::ShadowRamControl::Replay) { 334 Engines::Maxwell3D::Regs::ShadowRamControl::Replay) {