From 839db591d9daa388c1b6eb944a9f34a9aa41c871 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Fri, 2 Dec 2022 20:07:30 +0100 Subject: HW/Memmap: Refactor Memory to class, move to Core::System. --- Source/Core/VideoCommon/OpcodeDecoding.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp') 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(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) -- cgit v1.2.3