We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9939f1c commit 95797b0Copy full SHA for 95797b0
src/core/gpu.cpp
@@ -531,6 +531,19 @@ void GPU::WriteRegister(u32 offset, u32 value)
531
if (m_gpu_dump) [[unlikely]]
532
m_gpu_dump->WriteGP0Packet(value);
533
534
+ // FIFO can be overflowed through direct GP0 writes if the command tick event hasn't run, because
535
+ // there's no backpressure applied to the CPU. Instead force the GPU to run and catch up.
536
+ if (m_fifo.GetSize() >= m_fifo_size) [[unlikely]]
537
+ {
538
+ s_command_tick_event.InvokeEarly();
539
+
540
+ if (m_fifo.GetSize() >= m_fifo.GetCapacity()) [[unlikely]]
541
542
+ WARNING_LOG("GPU FIFO overflow via GP0 write, size={}", m_fifo.GetSize());
543
+ return;
544
+ }
545
546
547
m_fifo.Push(value);
548
ExecuteCommands();
549
return;
0 commit comments