diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-02 20:07:30 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-03 13:27:02 +0100 |
| commit | 839db591d9daa388c1b6eb944a9f34a9aa41c871 (patch) | |
| tree | 38ea0e3d41b297c6adf6fba87c35d7a7a36a12e6 /Source/Core/VideoCommon/OpcodeDecoding.cpp | |
| parent | 7cd9a78ebf6e49b21a5a5eee99858822a8946faa (diff) | |
HW/Memmap: Refactor Memory to class, move to Core::System.
Diffstat (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/OpcodeDecoding.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/OpcodeDecoding.cpp b/Source/Core/VideoCommon/OpcodeDecoding.cpp index 36c9093365..d14bb46e6c 100644 --- a/Source/Core/VideoCommon/OpcodeDecoding.cpp +++ b/Source/Core/VideoCommon/OpcodeDecoding.cpp @@ -153,7 +153,9 @@ public: if constexpr (is_preprocess) { - const u8* const start_address = Memory::GetPointer(address); + auto& system = Core::System::GetInstance(); + auto& memory = system.GetMemory(); + const u8* const start_address = memory.GetPointer(address); Fifo::PushFifoAuxBuffer(start_address, size); @@ -167,11 +169,17 @@ public: const u8* start_address; if (Fifo::UseDeterministicGPUThread()) + { start_address = static_cast<u8*>(Fifo::PopFifoAuxBuffer(size)); + } else - start_address = Memory::GetPointer(address); + { + auto& system = Core::System::GetInstance(); + auto& memory = system.GetMemory(); + start_address = memory.GetPointer(address); + } - // Avoid the crash if Memory::GetPointer failed .. + // Avoid the crash if memory.GetPointer failed .. if (start_address != nullptr) { // temporarily swap dl and non-dl (small "hack" for the stats) |
