mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 12:32:43 +00:00
PPU: A few more minor bugfixes
This commit is contained in:
parent
d0b3891002
commit
4eaa03e9ba
@ -1658,6 +1658,11 @@ std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, bool virtual_lo
|
||||
|
||||
void ppu_unload_prx(const lv2_prx& prx)
|
||||
{
|
||||
if (prx.segs[0].ptr != vm::base(prx.segs[0].addr))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::unique_lock lock(g_fxo->get<ppu_linkage_info>().mutex, std::defer_lock);
|
||||
|
||||
// Clean linkage info
|
||||
@ -1708,10 +1713,7 @@ void ppu_unload_prx(const lv2_prx& prx)
|
||||
{
|
||||
if (!seg.size) continue;
|
||||
|
||||
if (seg.ptr == vm::base(seg.addr))
|
||||
{
|
||||
vm::dealloc(seg.addr, vm::main);
|
||||
}
|
||||
vm::dealloc(seg.addr, vm::main);
|
||||
|
||||
const std::string hash_seg = fmt::format("%s-%u", hash, &seg - prx.segs.data());
|
||||
|
||||
@ -2224,6 +2226,9 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str
|
||||
|
||||
void init_fxo_for_exec(utils::serial* ar, bool full);
|
||||
init_fxo_for_exec(ar, false);
|
||||
|
||||
liblv2_begin = 0;
|
||||
liblv2_end = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2231,9 +2236,6 @@ bool ppu_load_exec(const ppu_exec_object& elf, bool virtual_load, const std::str
|
||||
Emu.ConfigurePPUCache();
|
||||
}
|
||||
|
||||
liblv2_begin = 0;
|
||||
liblv2_end = 0;
|
||||
|
||||
if (!load_libs.empty())
|
||||
{
|
||||
for (const auto& name : load_libs)
|
||||
|
@ -3452,7 +3452,6 @@ extern void ppu_precompile(std::vector<std::string>& dir_queue, std::vector<ppu_
|
||||
{
|
||||
obj.clear(), src.close(); // Clear decrypted file and elf object memory
|
||||
ppu_initialize(*prx);
|
||||
ppu_unload_prx(*prx);
|
||||
ppu_finalize(*prx);
|
||||
continue;
|
||||
}
|
||||
@ -3704,8 +3703,6 @@ extern void ppu_initialize()
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user