1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Patch cooperate with system SPU group creation (#10791)

This commit is contained in:
Eladash 2021-08-29 22:03:17 +03:00 committed by GitHub
parent b07960d3bc
commit 6781373727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -635,7 +635,9 @@ error_code sys_spu_thread_group_create(ppu_thread& ppu, vm::ptr<u32> id, u32 num
default: return CELL_EINVAL; 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 // Constant size, unknown what it means
mem_size = SPU_LS_SIZE; mem_size = SPU_LS_SIZE;
@ -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 || 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; return CELL_EINVAL;
} }