mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-19 13:25:14 +00:00
SPU: Make SPURS limit a dynamic setting
This commit is contained in:
parent
feedc183a4
commit
8b79fd3da1
3 changed files with 25 additions and 5 deletions
|
|
@ -731,14 +731,16 @@ error_code sys_spu_thread_initialize(ppu_thread& ppu, vm::ptr<u32> thread, u32 g
|
|||
|
||||
if (++group->init == group->max_num)
|
||||
{
|
||||
if (g_cfg.core.max_spurs_threads < 6 && group->max_num > 0u + g_cfg.core.max_spurs_threads)
|
||||
if (u32 max_threads = std::min<u32>(g_cfg.core.max_spurs_threads, group->max_num); group->max_num > max_threads)
|
||||
{
|
||||
if (group->name.ends_with("CellSpursKernelGroup") && !group->name.ends_with("_libsailCellSpursKernelGroup"))
|
||||
constexpr std::string_view spurs_suffix = "CellSpursKernelGroup"sv;
|
||||
|
||||
if (group->name.ends_with(spurs_suffix) && !group->name.substr(0, group->name.size() - spurs_suffix.size()).ends_with("_libsail"))
|
||||
{
|
||||
// Hack: don't run more SPURS threads than specified.
|
||||
group->max_run = g_cfg.core.max_spurs_threads;
|
||||
group->max_run = max_threads;
|
||||
|
||||
spu_log.success("HACK: '%s' (0x%x) limited to %u threads.", group->name, group_id, +g_cfg.core.max_spurs_threads);
|
||||
spu_log.success("HACK: '%s' (0x%x) limited to %u threads.", group->name, group_id, max_threads);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue