mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-30 21:20:58 +01:00
06dd0ba3b4
This was causing a race condition where the "absurdly large aux buffer" panic alert would be triggered in the last bit of fifo processing on the CPU thread in deterministic mode (i.e. netplay). SyncGPU is supposed to move the auxiliary queue data to the beginning of the containing buffer so we don't have to deal with wraparound; if GpuRunningState is false, however, it just returns, because it's set to false by another thread - thus it doesn't know whether RunGpuLoop is still executing (in which case it can't just reset the pointers, because it may still be using the buffer) or not (in which case the condition variable it normally waits for to avoid the previous problem will never be signaled). However, SyncGPU's caller PushFifoAuxBuffer wasn't aware of this, so if the buffer was filling at just the right time, it'd stay full and that function would complain that it was about to overflow it. Similar problem with ReadDataFromFifoOnCPU afaik. Fix this by returning early from those as well; other callers of SyncGPU should be safe. A *slightly* cleaner alternative would be giving the CPU thread a way to tell when RunGpuLoop has actually exited, but whatever, this works. |
||
---|---|---|
.. | ||
Android | ||
Core | ||
DSPSpy | ||
DSPTool | ||
PCH | ||
UnitTests | ||
VSProps | ||
.clang-format | ||
CMakeLists.txt | ||
dolphin-emu.sln |