Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch cooperate with system SPU group creation #10791

Merged
merged 2 commits into from Aug 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_spu.cpp
Expand Up @@ -635,7 +635,9 @@ error_code sys_spu_thread_group_create(ppu_thread& ppu, vm::ptr<u32> id, u32 num
default: return CELL_EINVAL;
}

if (type & SYS_SPU_THREAD_GROUP_TYPE_COOPERATE_WITH_SYSTEM)
const bool is_system_coop = type & SYS_SPU_THREAD_GROUP_TYPE_COOPERATE_WITH_SYSTEM;

if (is_system_coop)
{
// Constant size, unknown what it means
mem_size = SPU_LS_SIZE;
Expand All @@ -653,7 +655,7 @@ error_code sys_spu_thread_group_create(ppu_thread& ppu, vm::ptr<u32> id, u32 num
}

if (num < min_threads || num > max_threads ||
(needs_root && min_prio == 0x10) || (use_scheduler && (prio > 255 || prio < min_prio)))
(needs_root && min_prio == 0x10) || (use_scheduler && !is_system_coop && (prio > 255 || prio < min_prio)))
{
return CELL_EINVAL;
}
Expand Down