Merge pull request #1745 from degasus/remove_gpu_sync

VideoCommon: Make GPU syncing hack optional
This commit is contained in:
Ryan Houdek 2014-12-27 04:26:17 -06:00
commit 1dbd8c0b96
4 changed files with 15 additions and 7 deletions

View File

@ -314,6 +314,7 @@ void SConfig::SaveCoreSettings(IniFile& ini)
core->Set("CPUThread", m_LocalCoreStartupParameter.bCPUThread); core->Set("CPUThread", m_LocalCoreStartupParameter.bCPUThread);
core->Set("DSPHLE", m_LocalCoreStartupParameter.bDSPHLE); core->Set("DSPHLE", m_LocalCoreStartupParameter.bDSPHLE);
core->Set("SkipIdle", m_LocalCoreStartupParameter.bSkipIdle); core->Set("SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
core->Set("SyncOnSkipIdle", m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack);
core->Set("DefaultISO", m_LocalCoreStartupParameter.m_strDefaultISO); core->Set("DefaultISO", m_LocalCoreStartupParameter.m_strDefaultISO);
core->Set("DVDRoot", m_LocalCoreStartupParameter.m_strDVDRoot); core->Set("DVDRoot", m_LocalCoreStartupParameter.m_strDVDRoot);
core->Set("Apploader", m_LocalCoreStartupParameter.m_strApploader); core->Set("Apploader", m_LocalCoreStartupParameter.m_strApploader);
@ -540,6 +541,7 @@ void SConfig::LoadCoreSettings(IniFile& ini)
core->Get("DSPHLE", &m_LocalCoreStartupParameter.bDSPHLE, true); core->Get("DSPHLE", &m_LocalCoreStartupParameter.bDSPHLE, true);
core->Get("CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true); core->Get("CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);
core->Get("SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true); core->Get("SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
core->Get("SyncOnSkipIdle", &m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack, true);
core->Get("DefaultISO", &m_LocalCoreStartupParameter.m_strDefaultISO); core->Get("DefaultISO", &m_LocalCoreStartupParameter.m_strDefaultISO);
core->Get("DVDRoot", &m_LocalCoreStartupParameter.m_strDVDRoot); core->Get("DVDRoot", &m_LocalCoreStartupParameter.m_strDVDRoot);
core->Get("Apploader", &m_LocalCoreStartupParameter.m_strApploader); core->Get("Apploader", &m_LocalCoreStartupParameter.m_strApploader);

View File

@ -34,7 +34,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bJITILTimeProfiling(false), bJITILOutputIR(false), bJITILTimeProfiling(false), bJITILOutputIR(false),
bFPRF(false), bFPRF(false),
bCPUThread(true), bDSPThread(false), bDSPHLE(true), bCPUThread(true), bDSPThread(false), bDSPHLE(true),
bSkipIdle(true), bNTSC(false), bForceNTSCJ(false), bSkipIdle(true), bSyncGPUOnSkipIdleHack(true), bNTSC(false), bForceNTSCJ(false),
bHLE_BS2(true), bEnableCheats(false), bHLE_BS2(true), bEnableCheats(false),
bMergeBlocks(false), bEnableMemcardSaving(true), bMergeBlocks(false), bEnableMemcardSaving(true),
bDPL2Decoder(false), iLatency(14), bDPL2Decoder(false), iLatency(14),
@ -69,6 +69,7 @@ void SCoreStartupParameter::LoadDefaults()
iCPUCore = CORE_JIT64; iCPUCore = CORE_JIT64;
bCPUThread = false; bCPUThread = false;
bSkipIdle = false; bSkipIdle = false;
bSyncGPUOnSkipIdleHack = true;
bRunCompareServer = false; bRunCompareServer = false;
bDSPHLE = true; bDSPHLE = true;
bFastmem = true; bFastmem = true;

View File

@ -163,6 +163,7 @@ struct SCoreStartupParameter
bool bDSPThread; bool bDSPThread;
bool bDSPHLE; bool bDSPHLE;
bool bSkipIdle; bool bSkipIdle;
bool bSyncGPUOnSkipIdleHack;
bool bNTSC; bool bNTSC;
bool bForceNTSCJ; bool bForceNTSCJ;
bool bHLE_BS2; bool bHLE_BS2;

View File

@ -11,6 +11,7 @@
#include "Common/StringUtil.h" #include "Common/StringUtil.h"
#include "Common/Thread.h" #include "Common/Thread.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h" #include "Core/Core.h"
#include "Core/CoreTiming.h" #include "Core/CoreTiming.h"
#include "Core/PowerPC/PowerPC.h" #include "Core/PowerPC/PowerPC.h"
@ -443,6 +444,8 @@ void Idle()
{ {
//DEBUG_LOG(POWERPC, "Idle"); //DEBUG_LOG(POWERPC, "Idle");
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack)
{
//When the FIFO is processing data we must not advance because in this way //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 //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 we process only the events required by the FIFO.
@ -451,6 +454,7 @@ void Idle()
ProcessFifoWaitEvents(); ProcessFifoWaitEvents();
Common::YieldCPU(); Common::YieldCPU();
} }
}
idledCycles += PowerPC::ppcState.downcount; idledCycles += PowerPC::ppcState.downcount;
PowerPC::ppcState.downcount = 0; PowerPC::ppcState.downcount = 0;