Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/spe/DataUpdate.cc @ 686:72d8bd31fc8c
add spe/DataLoad spe/DataUpdate
author | hiroki@localhost.localdomain |
---|---|
date | Sun, 06 Dec 2009 17:37:20 +0900 |
parents | |
children | 3c05b9e518ac |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Engine/spe/DataUpdate.cc Sun Dec 06 17:37:20 2009 +0900 @@ -0,0 +1,28 @@ +#include <stdio.h> +#include "DataUpdate.h" +#include "Func.h" + +/* これは必須 */ +SchedDefineTask(DataUpdate); + +static int +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); + + 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 + + return 0; +}