Made the CPU thread wait for the GPU thread to swap, when XFB is enabled. May fix some of the "FIFO is overflowed by GatherPipe ! CPU thread is too fast!" errors.

This commit is contained in:
skidau 2015-01-12 19:40:43 +11:00
parent 7105e5a8f0
commit 14ced85d85

View file

@ -125,6 +125,12 @@ void VideoBackendHardware::Video_EndField()
if (s_BackendInitialized)
{
SyncGPU(SYNC_GPU_SWAP);
// Wait until the GPU thread has swapped. Prevents FIFO overflows.
while (g_ActiveConfig.bUseXFB && SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread && s_swapRequested.IsSet())
{
Common::YieldCPU();
}
s_swapRequested.Set();
}
}