VideoCommon: Make GPU syncing hack optional

This hack is there for quite a long time, and lots of games crashes if it's disabled.
But it's still a hack, so it shouldn't be enabled hard coded. This commit create a new
ini option for this hack which is enabled by default.
Maybe some games does still run very fine without this hack.
This commit is contained in:
degasus
2014-12-21 11:54:53 +01:00
parent 9b2909357b
commit 7e12fec7c3
4 changed files with 15 additions and 7 deletions

View File

@ -11,6 +11,7 @@
#include "Common/StringUtil.h"
#include "Common/Thread.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/CoreTiming.h"
#include "Core/PowerPC/PowerPC.h"
@ -443,13 +444,16 @@ void Idle()
{
//DEBUG_LOG(POWERPC, "Idle");
//When the FIFO is processing data we must not advance because in this way
//the VI will be desynchronized. So, We are waiting until the FIFO finish and
//while we process only the events required by the FIFO.
while (g_video_backend->Video_IsPossibleWaitingSetDrawDone())
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack)
{
ProcessFifoWaitEvents();
Common::YieldCPU();
//When the FIFO is processing data we must not advance because in this way
//the VI will be desynchronized. So, We are waiting until the FIFO finish and
//while we process only the events required by the FIFO.
while (g_video_backend->Video_IsPossibleWaitingSetDrawDone())
{
ProcessFifoWaitEvents();
Common::YieldCPU();
}
}
idledCycles += PowerPC::ppcState.downcount;