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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPU: Quick fixes #4331

Merged
merged 3 commits into from
Mar 24, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/SPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ void SPUThread::push_snr(u32 number, u32 value)

void SPUThread::do_dma_transfer(const spu_mfc_cmd& args, bool from_mfc)
{
const bool is_get = (args.cmd & ~(MFC_BARRIER_MASK | MFC_FENCE_MASK)) == MFC_GET_CMD;
const bool is_get = (args.cmd & ~(MFC_BARRIER_MASK | MFC_FENCE_MASK | MFC_START_MASK)) == MFC_GET_CMD;

u32 eal = args.eal;
u32 lsa = args.lsa & 0x3ffff;
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/Cell/lv2/sys_spu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ void sys_spu_image::load(const fs::file& stream)
}
}

const u32 mem_size = nsegs * sizeof(sys_spu_segment) + ::size32(stream);

type = SYS_SPU_IMAGE_TYPE_KERNEL;
entry_point = obj.header.e_entry;
nsegs = sys_spu_image::get_nsegs(obj.progs);

const u32 mem_size = nsegs * sizeof(sys_spu_segment) + ::size32(stream);
segs = vm::cast(vm::alloc(mem_size, vm::main));

const u32 src = segs.addr() + nsegs * sizeof(sys_spu_segment);
Expand Down Expand Up @@ -298,7 +298,7 @@ error_code sys_spu_thread_group_create(vm::ptr<u32> id, u32 num, s32 prio, vm::p

// TODO: max num value should be affected by sys_spu_initialize() settings

if (attr->nsize > 0x80 || !num || num > 6 || ((prio < 16 || prio > 255) && attr->type != SYS_SPU_THREAD_GROUP_TYPE_EXCLUSIVE_NON_CONTEXT))
if (attr->nsize > 0x80 || !num || num > 6 || ((prio < 16 || prio > 255) && (attr->type != SYS_SPU_THREAD_GROUP_TYPE_EXCLUSIVE_NON_CONTEXT && attr->type != SYS_SPU_THREAD_GROUP_TYPE_COOPERATE_WITH_SYSTEM)))
{
return CELL_EINVAL;
}
Expand Down