Skip to content

Commit

Permalink
Merge pull request #1878 from skidau/fifo-overflow-xfb
Browse files Browse the repository at this point in the history
Made the CPU thread wait for the GPU thread to swap
  • Loading branch information
degasus committed Jan 12, 2015
2 parents b3474c8 + 14ced85 commit 197c38e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/VideoCommon/MainBase.cpp
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 197c38e

Please sign in to comment.