diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2024-11-09 02:12:54 +0000 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2024-11-09 03:29:05 +0000 |
| commit | fbce7374155cdd2df8a8bed2298f5c104ad2b946 (patch) | |
| tree | 88c75e7b7894c2666ade676795ed0d9d6bb40ac1 /Source | |
| parent | 4b0b9799a90f0d0fbdf248600f67d6d2e651f4e6 (diff) | |
ProcessorInterface: sync GPU just before PI_FIFO_RESET
GXAbortFrame() is problematic for Dolphin because it first writes
PI_FIFO_RESET (for which we discard our internal fifo), then disables CP
reads (for which we execute pending commands in the GP fifo in emulated
memory). I don't know whether there is a race condition on hardware, but
there is one for us. Avoid this by also doing a GPU sync here.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/HW/ProcessorInterface.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/Core/HW/ProcessorInterface.cpp b/Source/Core/Core/HW/ProcessorInterface.cpp index fc26896a54..3eddfd5ed5 100644 --- a/Source/Core/Core/HW/ProcessorInterface.cpp +++ b/Source/Core/Core/HW/ProcessorInterface.cpp @@ -98,6 +98,10 @@ void ProcessorInterfaceManager::RegisterMMIO(MMIO::Mapping* mmio, u32 base) { system.GetGPFifo().ResetGatherPipe(); + // Assume that all bytes that made it into the GPU fifo did in fact execute + // before this MMIO write takes effect. + system.GetFifo().SyncGPUForRegisterAccess(); + // Call Fifo::ResetVideoBuffer() from the video thread. Since that function // resets various pointers used by the video thread, we can't call it directly // from the CPU thread, so queue a task to do it instead. In single-core mode, |
