Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/task/DataAllocate.cc @ 986:ac437c3cf766 akira
double buffering of spanpack/polgonpack
not yet worked.
author | root@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 01 Oct 2010 03:42:25 +0900 |
parents | ad10d6d39ca6 |
children | 0b6f8c82625a |
line wrap: on
line diff
--- a/Renderer/Engine/task/DataAllocate.cc Fri Oct 01 02:49:38 2010 +0900 +++ b/Renderer/Engine/task/DataAllocate.cc Fri Oct 01 03:42:25 2010 +0900 @@ -10,15 +10,17 @@ run(SchedTask *s, void *rbuf, void *wbuf) { - long size = (long)s->get_param(0); - long load_id = (long)s->get_param(1); - - //printf("size %d",sizeof(float)*length); + int count = (int)s->get_input(rbuf, 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); - s->global_alloc(load_id, size); - - //MemList *ml = s->createMemList(length,length); - //s->global_set(load_id, (void *)ml); + void *buff = s->global_alloc(load_id, size); + if (idata != NULL) { + memcpy(buff,idata,size); + } + } return 0; }