diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-10 17:10:14 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-11 21:57:30 +0100 |
| commit | c486baffe63afdd36ad2a60bfee9168dae26e1bb (patch) | |
| tree | 5294c2a12c60d531daab56653d14daeb5324be33 /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | ec8aaf1f3040ed7dedf3c95c53e8101691c03208 (diff) | |
VideoCommon/PixelEngine: Pass Core::System to methods.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 91b8b1e31e..b155f6b3c3 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -186,7 +186,7 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) g_framebuffer_manager->RefreshPeekCache(); auto& system = Core::System::GetInstance(); if (!system.GetFifo().UseDeterministicGPUThread()) - system.GetPixelEngine().SetFinish(cycles_into_future); // may generate interrupt + system.GetPixelEngine().SetFinish(system, cycles_into_future); // may generate interrupt DEBUG_LOG_FMT(VIDEO, "GXSetDrawDone SetPEFinish (value: {:#04X})", bp.newvalue & 0xFFFF); return; } @@ -205,7 +205,7 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) auto& system = Core::System::GetInstance(); if (!system.GetFifo().UseDeterministicGPUThread()) { - system.GetPixelEngine().SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), false, + system.GetPixelEngine().SetToken(system, static_cast<u16>(bp.newvalue & 0xFFFF), false, cycles_into_future); } DEBUG_LOG_FMT(VIDEO, "SetPEToken {:#06X}", bp.newvalue & 0xFFFF); @@ -220,7 +220,7 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) auto& system = Core::System::GetInstance(); if (!system.GetFifo().UseDeterministicGPUThread()) { - system.GetPixelEngine().SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), true, + system.GetPixelEngine().SetToken(system, static_cast<u16>(bp.newvalue & 0xFFFF), true, cycles_into_future); } DEBUG_LOG_FMT(VIDEO, "SetPEToken + INT {:#06X}", bp.newvalue & 0xFFFF); @@ -764,21 +764,21 @@ void LoadBPReg(u8 reg, u32 value, int cycles_into_future) void LoadBPRegPreprocess(u8 reg, u32 value, int cycles_into_future) { + auto& system = Core::System::GetInstance(); + // masking via BPMEM_BP_MASK could hypothetically be a problem u32 newval = value & 0xffffff; switch (reg) { case BPMEM_SETDRAWDONE: if ((newval & 0xff) == 0x02) - Core::System::GetInstance().GetPixelEngine().SetFinish(cycles_into_future); + system.GetPixelEngine().SetFinish(system, cycles_into_future); break; case BPMEM_PE_TOKEN_ID: - Core::System::GetInstance().GetPixelEngine().SetToken(newval & 0xffff, false, - cycles_into_future); + system.GetPixelEngine().SetToken(system, newval & 0xffff, false, cycles_into_future); break; case BPMEM_PE_TOKEN_INT_ID: // Pixel Engine Interrupt Token ID - Core::System::GetInstance().GetPixelEngine().SetToken(newval & 0xffff, true, - cycles_into_future); + system.GetPixelEngine().SetToken(system, newval & 0xffff, true, cycles_into_future); break; } } |
