summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/MainBase.cpp
diff options
context:
space:
mode:
authorMarkus Wick <markus+github@selfnet.de>2015-01-12 22:53:46 +0100
committerMarkus Wick <markus+github@selfnet.de>2015-01-12 22:53:46 +0100
commit197c38e8659024c6c97a217329b04beea893753d (patch)
treee724726b7adaae04d7b3d28de52344d27a843491 /Source/Core/VideoCommon/MainBase.cpp
parentb3474c821868717ef6fe542ddcf1892dd0802c04 (diff)
parent14ced85d85d0f57984be3c0579c147aba496b837 (diff)
Merge pull request #1878 from skidau/fifo-overflow-xfb
Made the CPU thread wait for the GPU thread to swap
Diffstat (limited to 'Source/Core/VideoCommon/MainBase.cpp')
-rw-r--r--Source/Core/VideoCommon/MainBase.cpp6
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();
}
}