mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
SPU: add the concept of inaccurate reservations
Implement cellSpursRequestIdleSpu
This commit is contained in:
parent
d36cf71a2d
commit
82b1a2bd7a
4 changed files with 134 additions and 21 deletions
|
@ -1453,6 +1453,20 @@ void spu_thread::cpu_task()
|
|||
return fmt::format("%sSPU[0x%07x] Thread (%s) [0x%05x]", type >= spu_type::raw ? type == spu_type::isolated ? "Iso" : "Raw" : "", cpu->lv2_id, *name_cache.get(), cpu->pc);
|
||||
};
|
||||
|
||||
if (!spurs_addr)
|
||||
{
|
||||
// Evaluate it
|
||||
if (!group)
|
||||
{
|
||||
spurs_addr = -0x80; // Some invalid non-0 address
|
||||
}
|
||||
else
|
||||
{
|
||||
const u32 arg = static_cast<u32>(group->args[index][1]);
|
||||
spurs_addr = group->name.ends_with("CellSpursKernelGroup"sv) && vm::check_addr(arg) ? arg : 0u - 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
if (jit)
|
||||
{
|
||||
while (true)
|
||||
|
@ -2827,6 +2841,13 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!g_cfg.core.spu_accurate_reservations && addr - spurs_addr <= 0x80)
|
||||
{
|
||||
mov_rdata(vm::_ref<spu_rdata_t>(addr), to_write);
|
||||
res += 64;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (g_use_rtm) [[likely]]
|
||||
{
|
||||
switch (u64 count = spu_putllc_tx(addr, rtime, rdata, to_write))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue