diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-29 02:15:53 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-29 02:15:53 -0400 |
| commit | e8127c3759ae260bfae09e3a3a74853204bcd1ee (patch) | |
| tree | 16d0b1f6ad770876b45cea0af6d183020fe070af /src/video_core/macro.cpp | |
| parent | 0380b0628d4be15fb3eec4e32585c39e507c3851 (diff) | |
nx2: macro memo tries each macro's last call first; FIFO filled only when interpreting
46% of title 1's macro calls repeat the previous call of the same
macro exactly: a per-start slot holding that record's offset skips the
hash and the map probe for them (the record is still in the CPU cache).
The interpreter's parameter FIFO was filled before the memo lookup; it
is now filled only for calls that are interpreted.
Checked against the previous interpreter on 200,000 recorded 3D-scene
calls: identical writes, registers and data RAM.
Diffstat (limited to 'src/video_core/macro.cpp')
| -rw-r--r-- | src/video_core/macro.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/macro.cpp b/src/video_core/macro.cpp index 2864d1c5ad..3422cb16fa 100644 --- a/src/video_core/macro.cpp +++ b/src/video_core/macro.cpp @@ -1359,9 +1359,9 @@ void MacroEngine::Execute(Core::System& system, Engines::Maxwell3D& maxwell3d, u LOG_DEBUG(HW_GPU, "Native MME context={:#x}", context); LOG_DEBUG(HW_GPU, "Native MME start={:#x}, parameters={}, data={:08x}", method, parameters.size(), fmt::join(parameters, ",")); } - // Reused between calls (a macro never calls another: methods >= 0xe00 are refused below). + // Reused between calls (a macro never calls another: methods >= 0xe00 are refused below); + // filled only for calls that are interpreted. auto& fifo = native_fifo; - fifo.assign(parameters.begin(), parameters.end()); native_interpreter.active_dram = &maxwell3d.GetNativeDataRam(); // EDEN_NX2_MME_RECORD=<file>: write the first 200000 calls (u32 start, u32 count, the // parameters) and then the macro code to <file>.code, to check interpreter changes @@ -1482,6 +1482,7 @@ void MacroEngine::Execute(Core::System& system, Engines::Maxwell3D& maxwell3d, u } native_writes.clear(); } + fifo.assign(parameters.begin(), parameters.end()); const u64 code_generation = native_code_generation; const auto result = native_interpreter.Execute(native_code, method, fifo, [&](u32 address) { return address < Maxwell3D::Regs::NUM_REGS ? maxwell3d.GetRegisterValue(address) : 0U; }, |
