summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OpcodeDecoding.cpp
diff options
context:
space:
mode:
authorMai <mathew1800@gmail.com>2022-12-07 00:52:31 +0000
committerGitHub <noreply@github.com>2022-12-07 00:52:31 +0000
commit94faad0d3727876f507577655d771d1f978b2f4a (patch)
treed43be9b3cc0bfdd24143a2a5d195ea8d065afe95 /Source/Core/VideoCommon/OpcodeDecoding.cpp
parent2a23aab25418fc4587b7a8480283b68a9d13eeb9 (diff)
parent839db591d9daa388c1b6eb944a9f34a9aa41c871 (diff)
Merge pull request #11320 from AdmiralCurtiss/globals-memory
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.cpp14
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)