diff options
| author | skidau <skidau@gmail.com> | 2015-01-12 19:40:43 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-01-12 19:40:43 +1100 |
| commit | 14ced85d85d0f57984be3c0579c147aba496b837 (patch) | |
| tree | 1c5ea496aa6fabebf275576d145c5dccb9f6acc6 /Source/Core/VideoCommon/MainBase.cpp | |
| parent | 7105e5a8f01120f459300a81841e287fa6bbeec2 (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoCommon/MainBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/MainBase.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp index 40d2f57f20..b5c6cdebf9 100644 --- a/Source/Core/VideoCommon/MainBase.cpp +++ b/Source/Core/VideoCommon/MainBase.cpp @@ -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(); } } |
