From ec8aaf1f3040ed7dedf3c95c53e8101691c03208 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sat, 10 Dec 2022 16:35:07 +0100 Subject: VideoCommon/PixelEngine: Refactor to class, move to Core::System. --- Source/Core/VideoCommon/BPStructs.cpp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoCommon/BPStructs.cpp') diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index cc390a5d79..91b8b1e31e 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()) - PixelEngine::SetFinish(cycles_into_future); // may generate interrupt + system.GetPixelEngine().SetFinish(cycles_into_future); // may generate interrupt DEBUG_LOG_FMT(VIDEO, "GXSetDrawDone SetPEFinish (value: {:#04X})", bp.newvalue & 0xFFFF); return; } @@ -204,7 +204,10 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) g_framebuffer_manager->RefreshPeekCache(); auto& system = Core::System::GetInstance(); if (!system.GetFifo().UseDeterministicGPUThread()) - PixelEngine::SetToken(static_cast(bp.newvalue & 0xFFFF), false, cycles_into_future); + { + system.GetPixelEngine().SetToken(static_cast(bp.newvalue & 0xFFFF), false, + cycles_into_future); + } DEBUG_LOG_FMT(VIDEO, "SetPEToken {:#06X}", bp.newvalue & 0xFFFF); return; } @@ -216,7 +219,10 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) g_framebuffer_manager->RefreshPeekCache(); auto& system = Core::System::GetInstance(); if (!system.GetFifo().UseDeterministicGPUThread()) - PixelEngine::SetToken(static_cast(bp.newvalue & 0xFFFF), true, cycles_into_future); + { + system.GetPixelEngine().SetToken(static_cast(bp.newvalue & 0xFFFF), true, + cycles_into_future); + } DEBUG_LOG_FMT(VIDEO, "SetPEToken + INT {:#06X}", bp.newvalue & 0xFFFF); return; } @@ -764,13 +770,15 @@ void LoadBPRegPreprocess(u8 reg, u32 value, int cycles_into_future) { case BPMEM_SETDRAWDONE: if ((newval & 0xff) == 0x02) - PixelEngine::SetFinish(cycles_into_future); + Core::System::GetInstance().GetPixelEngine().SetFinish(cycles_into_future); break; case BPMEM_PE_TOKEN_ID: - PixelEngine::SetToken(newval & 0xffff, false, cycles_into_future); + Core::System::GetInstance().GetPixelEngine().SetToken(newval & 0xffff, false, + cycles_into_future); break; case BPMEM_PE_TOKEN_INT_ID: // Pixel Engine Interrupt Token ID - PixelEngine::SetToken(newval & 0xffff, true, cycles_into_future); + Core::System::GetInstance().GetPixelEngine().SetToken(newval & 0xffff, true, + cycles_into_future); break; } } -- cgit v1.2.3