mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Module: Reinit gpu only on runtime module load.
During initial loading, we load the module in a thread. It's not deterministic if the gpu will load before or after the ELF, which can cause a crash. There's no real reason to Reinitialize() it there, though. We already Reinitialize() on gpu start.
This commit is contained in:
parent
f648a82df9
commit
2e0eade993
1 changed files with 6 additions and 2 deletions
|
@ -1635,8 +1635,6 @@ void __KernelLoadReset() {
|
|||
HLEShutdown();
|
||||
Replacement_Init();
|
||||
HLEInit();
|
||||
assert(gpu);
|
||||
gpu->Reinitialize();
|
||||
}
|
||||
|
||||
__KernelModuleInit();
|
||||
|
@ -1836,6 +1834,9 @@ int sceKernelLoadExec(const char *filename, u32 paramPtr)
|
|||
Core_UpdateState(CORE_ERROR);
|
||||
return -1;
|
||||
}
|
||||
if (gpu) {
|
||||
gpu->Reinitialize();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1920,6 +1921,9 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) {
|
|||
NOTICE_LOG_REPORT(LOADER, "Module %s is blacklisted or undecryptable - we try __KernelLoadExec", name);
|
||||
// Name might get deleted.
|
||||
const std::string safeName = name;
|
||||
if (gpu) {
|
||||
gpu->Reinitialize();
|
||||
}
|
||||
return __KernelLoadExec(safeName.c_str(), 0, &error_string);
|
||||
} else {
|
||||
hleLogError(LOADER, error, "failed to load");
|
||||
|
|
Loading…
Add table
Reference in a new issue