Permalink
Browse files

Remove the setting to run the display list interpreter on a separate …

…thread.
  • Loading branch information...
hrydgard committed Nov 5, 2017
1 parent 3c591ad commit be2ba4ffb365a6361a722190971fee796f716dc0
Showing with 17 additions and 28 deletions.
  1. +0 −1 Core/Config.cpp
  2. +0 −2 Core/Config.h
  3. +15 −11 Core/System.cpp
  4. +2 −2 GPU/GPUCommon.cpp
  5. +0 −5 GPU/Software/SoftGpu.cpp
  6. +0 −7 UI/GameSettingsScreen.cpp
View
@@ -406,7 +406,6 @@ static bool DefaultSasThread() {
static ConfigSetting cpuSettings[] = {
ReportedConfigSetting("CPUCore", &g_Config.iCpuCore, &DefaultCpuCore, true, true),
ReportedConfigSetting("SeparateCPUThread", &g_Config.bSeparateCPUThread, false, true, true),
ReportedConfigSetting("SeparateSASThread", &g_Config.bSeparateSASThread, &DefaultSasThread, true, true),
ReportedConfigSetting("SeparateIOThread", &g_Config.bSeparateIOThread, true, true, true),
ReportedConfigSetting("IOTimingMethod", &g_Config.iIOTimingMethod, IOTIMING_FAST, true, true),
View
@@ -132,8 +132,6 @@ struct Config {
bool bFuncReplacements;
bool bHideSlowWarnings;
// Definitely cannot be changed while game is running.
bool bSeparateCPUThread;
bool bSeparateSASThread;
bool bSeparateIOThread;
int iIOTimingMethod;
View
@@ -392,10 +392,10 @@ void System_Wake() {
// Ugly!
static bool pspIsInited = false;
static bool pspIsIniting = false;
static bool pspIsQuiting = false;
static bool pspIsQuitting = false;
bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) {
if (pspIsIniting || pspIsQuiting) {
if (pspIsIniting || pspIsQuitting) {
return false;
}
@@ -415,7 +415,9 @@ bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) {
coreParameter.errorString = "";
pspIsIniting = true;
if (g_Config.bSeparateCPUThread) {
// Keeping this around because we might need it in the future.
const bool separateCPUThread = false;
if (separateCPUThread) {
Core_ListenShutdown(System_Wake);
CPU_SetState(CPU_THREAD_PENDING);
cpuThread = new std::thread(&CPU_RunLoop);
@@ -438,7 +440,7 @@ bool PSP_InitUpdate(std::string *error_string) {
return true;
}
if (g_Config.bSeparateCPUThread && !CPU_IsReady()) {
if (!CPU_IsReady()) {
return false;
}
@@ -459,7 +461,8 @@ bool PSP_InitUpdate(std::string *error_string) {
bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
PSP_InitStart(coreParam, error_string);
if (g_Config.bSeparateCPUThread) {
// For a potential resurrection of separate CPU thread later.
if (false) {
CPU_WaitStatus(cpuThreadReplyCond, &CPU_IsReady);
}
@@ -472,12 +475,12 @@ bool PSP_IsIniting() {
}
bool PSP_IsInited() {
return pspIsInited && !pspIsQuiting;
return pspIsInited && !pspIsQuitting;
}
void PSP_Shutdown() {
// Do nothing if we never inited.
if (!pspIsInited && !pspIsIniting && !pspIsQuiting) {
if (!pspIsInited && !pspIsIniting && !pspIsQuitting) {
return;
}
@@ -488,7 +491,7 @@ void PSP_Shutdown() {
#endif
// Make sure things know right away that PSP memory, etc. is going away.
pspIsQuiting = true;
pspIsQuitting = true;
if (coreState == CORE_RUNNING)
Core_UpdateState(CORE_ERROR);
Core_NotifyShutdown();
@@ -507,7 +510,7 @@ void PSP_Shutdown() {
currentMIPS = 0;
pspIsInited = false;
pspIsIniting = false;
pspIsQuiting = false;
pspIsQuitting = false;
g_Config.unloadGameConfig();
}
@@ -532,8 +535,9 @@ void PSP_RunLoopUntil(u64 globalticks) {
return;
}
// Switch the CPU thread on or off, as the case may be.
bool useCPUThread = g_Config.bSeparateCPUThread;
// We no longer allow a separate CPU thread but if we add a render queue
// to GL we're gonna need it.
bool useCPUThread = false;
if (useCPUThread && cpuThread == nullptr) {
// Need to start the cpu thread.
Core_ListenShutdown(System_Wake);
View
@@ -359,11 +359,11 @@ GPUCommon::GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw) :
// The compiler was not rounding the struct size up to an 8 byte boundary, which
// you'd expect due to the int64 field, but the Linux ABI apparently does not require that.
static_assert(sizeof(DisplayList) == 456, "Bad DisplayList size");
listLock.set_enabled(g_Config.bSeparateCPUThread);
listLock.set_enabled(false);
Reinitialize();
SetupColorConv();
SetThreadEnabled(g_Config.bSeparateCPUThread);
SetThreadEnabled(false);
gstate.Reset();
gstate_c.Reset();
gpuStats.Reset();
View
@@ -913,11 +913,6 @@ bool SoftGPU::PerformStencilUpload(u32 dest, int size)
}
bool SoftGPU::FramebufferDirty() {
if (g_Config.bSeparateCPUThread) {
// Allow it to process fully before deciding if it's dirty.
SyncThread();
}
if (g_Config.iFrameSkip != 0) {
bool dirty = framebufferDirty_;
framebufferDirty_ = false;
@@ -661,13 +661,6 @@ void GameSettingsScreen::CreateViews() {
systemSettings->Add(new CheckBox(&g_Config.bFastMemory, sy->T("Fast Memory", "Fast Memory (Unstable)")))->OnClick.Handle(this, &GameSettingsScreen::OnJitAffectingSetting);
auto separateCPUThread = new CheckBox(&g_Config.bSeparateCPUThread, sy->T("Multithreaded (experimental)"));
systemSettings->Add(separateCPUThread);
separateCPUThread->OnClick.Add([=](EventParams &e) {
if (g_Config.bSeparateCPUThread)
settingInfo_->Show(sy->T("Multithreaded Tip", "Not always faster, causes glitches/crashing"), e.v);
return UI::EVENT_CONTINUE;
});
systemSettings->Add(new CheckBox(&g_Config.bSeparateIOThread, sy->T("I/O on thread (experimental)")))->SetEnabled(!PSP_IsInited());
static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" };
View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), sy->GetName(), screenManager()));

0 comments on commit be2ba4f

Please sign in to comment.