mirror of https://github.com/RPCS3/rpcs3.git
PPU LLVM: Precompile system-internal executables if booting a dev_flash's program
This commit is contained in:
parent
6805d8c7e0
commit
a2a6303a22
|
@ -2343,7 +2343,7 @@ extern void ppu_finalize(const ppu_module& info)
|
||||||
// Get PPU cache location
|
// Get PPU cache location
|
||||||
cache_path = fs::get_cache_dir() + "cache/";
|
cache_path = fs::get_cache_dir() + "cache/";
|
||||||
|
|
||||||
const std::string dev_flash = vfs::get("/dev_flash/");
|
const std::string dev_flash = vfs::get("/dev_flash/sys/");
|
||||||
|
|
||||||
if (info.path.starts_with(dev_flash) || Emu.GetCat() == "1P")
|
if (info.path.starts_with(dev_flash) || Emu.GetCat() == "1P")
|
||||||
{
|
{
|
||||||
|
@ -2699,9 +2699,26 @@ extern void ppu_initialize()
|
||||||
|
|
||||||
std::vector<std::string> dir_queue;
|
std::vector<std::string> dir_queue;
|
||||||
|
|
||||||
if (compile_fw)
|
const std::string mount_point = vfs::get("/dev_flash/");
|
||||||
|
|
||||||
|
bool dev_flash_located = Emu.GetCat().back() != 'P' && Emu.IsPathInsideDir(Emu.GetBoot(), mount_point);
|
||||||
|
|
||||||
|
if (compile_fw || dev_flash_located)
|
||||||
{
|
{
|
||||||
const std::string firmware_sprx_path = vfs::get("/dev_flash/sys/external/");
|
if (dev_flash_located)
|
||||||
|
{
|
||||||
|
const std::string eseibrd = mount_point + "/vsh/module/eseibrd.sprx";
|
||||||
|
|
||||||
|
if (auto prx = ppu_load_prx(ppu_prx_object{decrypt_self(fs::file{eseibrd})}, eseibrd, 0))
|
||||||
|
{
|
||||||
|
// Check if cache exists for this infinitesimally small prx
|
||||||
|
dev_flash_located = ppu_initialize(*prx, true);
|
||||||
|
idm::remove<lv2_obj, lv2_prx>(idm::last_id());
|
||||||
|
ppu_unload_prx(*prx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::string firmware_sprx_path = vfs::get(dev_flash_located ? "/dev_flash/"sv : "/dev_flash/sys/"sv);
|
||||||
dir_queue.emplace_back(firmware_sprx_path);
|
dir_queue.emplace_back(firmware_sprx_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2666,7 +2666,7 @@ void main_window::CreateFirmwareCache()
|
||||||
Emu.GracefulShutdown(false);
|
Emu.GracefulShutdown(false);
|
||||||
Emu.SetForceBoot(true);
|
Emu.SetForceBoot(true);
|
||||||
|
|
||||||
if (const game_boot_result error = Emu.BootGame(g_cfg_vfs.get_dev_flash(), "", true);
|
if (const game_boot_result error = Emu.BootGame(g_cfg_vfs.get_dev_flash() + "sys", "", true);
|
||||||
error != game_boot_result::no_errors)
|
error != game_boot_result::no_errors)
|
||||||
{
|
{
|
||||||
gui_log.error("Creating firmware cache failed: reason: %s", error);
|
gui_log.error("Creating firmware cache failed: reason: %s", error);
|
||||||
|
|
Loading…
Reference in New Issue