diff --git a/Core/Config.cpp b/Core/Config.cpp index e4adbd12ff..9ddda1a9e9 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -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), diff --git a/Core/Config.h b/Core/Config.h index 37dd1373fe..6a1d4c2134 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -132,8 +132,6 @@ public: bool bFuncReplacements; bool bHideSlowWarnings; - // Definitely cannot be changed while game is running. - bool bSeparateCPUThread; bool bSeparateSASThread; bool bSeparateIOThread; int iIOTimingMethod; diff --git a/Core/System.cpp b/Core/System.cpp index 04c93deeb1..6f7069f1f2 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -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); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 53b39e6d32..84873b5133 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -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(); diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index 812c164cb2..89b8383fb0 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -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; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 5baed5463e..7579c65aaa 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -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()));