mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Remove the setting to run the display list interpreter on a separate thread.
This commit is contained in:
parent
3c591ad9ca
commit
be2ba4ffb3
6 changed files with 17 additions and 28 deletions
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()));
|
||||
|
|
Loading…
Add table
Reference in a new issue