summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
diff options
context:
space:
mode:
authorMai <mai.iam2048@gmail.com>2022-12-10 19:13:23 +0000
committerGitHub <noreply@github.com>2022-12-10 19:13:23 +0000
commit54e01c660e7f11f0abc47d66427e4b74c438bb94 (patch)
tree82e740cb05a6811e17e1f324679ba7c2c6bb2bc3 /Source/Core/VideoCommon/BPStructs.cpp
parent128c23dc29b03740a79bf88cae43699ec8578c35 (diff)
parentceae4242fc4775b19193ce16dc3055c7845f20d4 (diff)
Merge pull request #11334 from AdmiralCurtiss/globals-fifo
VideoCommon/Fifo: Refactor to class, move to Core::System.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index 1bc9f69150..cc390a5d79 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -179,14 +179,17 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future)
switch (bp.newvalue & 0xFF)
{
case 0x02:
+ {
INCSTAT(g_stats.this_frame.num_draw_done);
g_texture_cache->FlushEFBCopies();
g_framebuffer_manager->InvalidatePeekCache(false);
g_framebuffer_manager->RefreshPeekCache();
- if (!Fifo::UseDeterministicGPUThread())
+ auto& system = Core::System::GetInstance();
+ if (!system.GetFifo().UseDeterministicGPUThread())
PixelEngine::SetFinish(cycles_into_future); // may generate interrupt
DEBUG_LOG_FMT(VIDEO, "GXSetDrawDone SetPEFinish (value: {:#04X})", bp.newvalue & 0xFFFF);
return;
+ }
default:
WARN_LOG_FMT(VIDEO, "GXSetDrawDone ??? (value {:#04X})", bp.newvalue & 0xFFFF);
@@ -194,23 +197,29 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future)
}
return;
case BPMEM_PE_TOKEN_ID: // Pixel Engine Token ID
+ {
INCSTAT(g_stats.this_frame.num_token);
g_texture_cache->FlushEFBCopies();
g_framebuffer_manager->InvalidatePeekCache(false);
g_framebuffer_manager->RefreshPeekCache();
- if (!Fifo::UseDeterministicGPUThread())
+ auto& system = Core::System::GetInstance();
+ if (!system.GetFifo().UseDeterministicGPUThread())
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
+ {
INCSTAT(g_stats.this_frame.num_token_int);
g_texture_cache->FlushEFBCopies();
g_framebuffer_manager->InvalidatePeekCache(false);
g_framebuffer_manager->RefreshPeekCache();
- if (!Fifo::UseDeterministicGPUThread())
+ auto& system = Core::System::GetInstance();
+ if (!system.GetFifo().UseDeterministicGPUThread())
PixelEngine::SetToken(static_cast<u16>(bp.newvalue & 0xFFFF), true, cycles_into_future);
DEBUG_LOG_FMT(VIDEO, "SetPEToken + INT {:#06X}", bp.newvalue & 0xFFFF);
return;
+ }
// ------------------------
// EFB copy command. This copies a rectangle from the EFB to either RAM in a texture format or to