Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/spe/DataUpdate.cc @ 725:3c05b9e518ac
Light data load fix (general load routine)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 19 Dec 2009 15:02:43 +0900 |
parents | 72d8bd31fc8c |
children | 4455e7b0caf3 |
line wrap: on
line diff
--- a/Renderer/Engine/spe/DataUpdate.cc Sat Dec 19 14:36:37 2009 +0900 +++ b/Renderer/Engine/spe/DataUpdate.cc Sat Dec 19 15:02:43 2009 +0900 @@ -1,6 +1,7 @@ #include <stdio.h> #include "DataUpdate.h" #include "Func.h" +#include "string.h" /* これは必須 */ SchedDefineTask(DataUpdate); @@ -9,20 +10,12 @@ run(SchedTask *s, void *rbuf, void *wbuf) { - float *idata = (float*)s->get_input(rbuf, 0); - int load_id = (int)s->get_param(0); - float *global_data = (float*)s->global_get(load_id); + void *idata = (void*)s->get_input(rbuf, 0); + int size = (int)s->get_param(0); + int load_id = (int)s->get_param(1); + void *global_data = (void*)s->global_get(load_id); - global_data[0] = idata[0]; - global_data[1] = idata[1]; - global_data[2] = idata[2]; - global_data[3] = idata[3]; - -#if 0 - s->printf("spe %f ",idata[0]); - s->printf("spe %f ",idata[1]); - s->printf("spe %f\n",idata[2]); -#endif + memcpy(global_data,idata,size); return 0; }