Mercurial > hg > Game > Cerium
view Renderer/Engine/spe/DataAllocate.cc @ 1142:801d57ae1e29 draft
cut compile CreatePolygonTask on spe side because not enough spe memory. We have to use code loading.
And I found light error. see you tomorrow. (This version can work Mac OSX and Cell arch.)
author | yutaka@localhost.localdomain |
---|---|
date | Thu, 17 Feb 2011 05:23:34 +0900 |
parents | da1cec21f0c9 |
children | 95b114c66e14 |
line wrap: on
line source
//#include <stdio.h> #include <string.h> #include "DataAllocate.h" #include "Func.h" /* これは必須 */ SchedDefineTask(DataAllocate); static int run(SchedTask *s, void *rbuf, void *wbuf) { int count = (int)s->get_param(0); for(int i=0;i<count;i++) { void *idata = s->get_input(rbuf, i); long size = (long)s->get_param(i*2+1); long load_id = (long)s->get_param(i*2+2); void *buff = s->global_alloc(load_id, size); if (idata != NULL) { memcpy(buff,idata,size); } } return 0; }