Store sys_spu_image value

This commit is contained in:
Nekotekina 2017-07-05 22:42:03 +03:00
parent bab537c7e2
commit 9a38d63661
2 changed files with 4 additions and 4 deletions

View File

@ -203,7 +203,7 @@ error_code sys_spu_thread_initialize(vm::ptr<u32> thread, u32 group_id, u32 spu_
group->threads[spu_num] = std::move(spu);
group->args[spu_num] = {arg->arg1, arg->arg2, arg->arg3, arg->arg4};
group->imgs[spu_num] = img;
group->imgs[spu_num] = *img;
if (++group->init == group->num)
{
@ -345,9 +345,9 @@ error_code sys_spu_thread_group_start(ppu_thread& ppu, u32 id)
auto& args = group->args[thread->index];
auto& img = group->imgs[thread->index];
img->deploy(thread->offset);
img.deploy(thread->offset);
thread->pc = img->entry_point;
thread->pc = img.entry_point;
thread->cpu_init();
thread->gpr[3] = v128::from64(0, args[0]);
thread->gpr[4] = v128::from64(0, args[1]);

View File

@ -153,7 +153,7 @@ struct lv2_spu_group
cond_variable cv; // used to signal waiting PPU thread
std::array<std::shared_ptr<SPUThread>, 256> threads; // SPU Threads
std::array<vm::ps3::ptr<sys_spu_image>, 256> imgs; // SPU Images
std::array<sys_spu_image, 256> imgs; // SPU Images
std::array<std::array<u64, 4>, 256> args; // SPU Thread Arguments
std::weak_ptr<lv2_event_queue> ep_run; // port for SYS_SPU_THREAD_GROUP_EVENT_RUN events