diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-12-02 07:21:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-02 07:21:41 -0500 |
| commit | c12e4e8ee080e682b515f7990f416db0150e9c02 (patch) | |
| tree | 677ea2d2b440fb82a88c8fdc4b01afa6fc71acdb /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | 26e4e67d4536835cc1fdf09a5c3ce75404dc8d87 (diff) | |
| parent | f5c550e9cb8f5bbc6a4f9bd77bc84c077671c480 (diff) | |
Merge pull request #10244 from phire/ban-timetravel
Delay singlecore gpu interrupts; Fixes Bomberman Jetters in single core mode.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index 1ec097fe6e..0fc4ca6785 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -50,7 +50,7 @@ void BPInit() bpmem.bpMask = 0xFFFFFF; } -static void BPWritten(const BPCmd& bp) +static void BPWritten(const BPCmd& bp, int cycles_into_future) { /* ---------------------------------------------------------------------------------------------------------------- @@ -180,7 +180,7 @@ static void BPWritten(const BPCmd& bp) g_texture_cache->FlushEFBCopies(); g_framebuffer_manager->InvalidatePeekCache(false); if (!Fifo::UseDeterministicGPUThread()) - PixelEngine::SetFinish(); // may generate interrupt + PixelEngine::SetFinish(cycles_into_future); // may generate interrupt DEBUG_LOG_FMT(VIDEO, "GXSetDrawDone SetPEFinish (value: {:#04X})", bp.newvalue & 0xFFFF); return; @@ -193,14 +193,14 @@ static void BPWritten(const BPCmd& bp) g_texture_cache->FlushEFBCopies(); g_framebuffer_manager->InvalidatePeekCache(false); if (!Fifo::UseDeterministicGPUThread()) - PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), false); + PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), false, cycles_into_future); DEBUG_LOG_FMT(VIDEO, "SetPEToken {:#06X}", bp.newvalue & 0xFFFF); return; case BPMEM_PE_TOKEN_INT_ID: // Pixel Engine Interrupt Token ID g_texture_cache->FlushEFBCopies(); g_framebuffer_manager->InvalidatePeekCache(false); if (!Fifo::UseDeterministicGPUThread()) - PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), true); + PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), true, cycles_into_future); DEBUG_LOG_FMT(VIDEO, "SetPEToken + INT {:#06X}", bp.newvalue & 0xFFFF); return; @@ -717,7 +717,7 @@ static void BPWritten(const BPCmd& bp) } // Call browser: OpcodeDecoding.cpp ExecuteDisplayList > Decode() > LoadBPReg() -void LoadBPReg(u32 value0) +void LoadBPReg(u32 value0, int cycles_into_future) { int regNum = value0 >> 24; int oldval = ((u32*)&bpmem)[regNum]; @@ -730,10 +730,10 @@ void LoadBPReg(u32 value0) if (regNum != BPMEM_BP_MASK) bpmem.bpMask = 0xFFFFFF; - BPWritten(bp); + BPWritten(bp, cycles_into_future); } -void LoadBPRegPreprocess(u32 value0) +void LoadBPRegPreprocess(u32 value0, int cycles_into_future) { int regNum = value0 >> 24; // masking could hypothetically be a problem @@ -742,13 +742,13 @@ void LoadBPRegPreprocess(u32 value0) { case BPMEM_SETDRAWDONE: if ((newval & 0xff) == 0x02) - PixelEngine::SetFinish(); + PixelEngine::SetFinish(cycles_into_future); break; case BPMEM_PE_TOKEN_ID: - PixelEngine::SetToken(newval & 0xffff, false); + PixelEngine::SetToken(newval & 0xffff, false, cycles_into_future); break; case BPMEM_PE_TOKEN_INT_ID: // Pixel Engine Interrupt Token ID - PixelEngine::SetToken(newval & 0xffff, true); + PixelEngine::SetToken(newval & 0xffff, true, cycles_into_future); break; } } |
