Mercurial > hg > Game > Cerium
comparison Renderer/Engine/spe/DataAllocate.cc @ 1403:95b114c66e14 draft
unify RenderTask
author | sugi |
---|---|
date | Wed, 15 Feb 2012 16:52:00 +0900 |
parents | 801d57ae1e29 |
children |
comparison
equal
deleted
inserted
replaced
1402:815dd5f2d150 | 1403:95b114c66e14 |
---|---|
1 //#include <stdio.h> | |
2 #include <string.h> | 1 #include <string.h> |
3 #include "DataAllocate.h" | 2 #include "DataAllocate.h" |
4 #include "Func.h" | 3 #include "Func.h" |
5 | 4 |
6 /* これは必須 */ | 5 /* これは必須 */ |
7 SchedDefineTask(DataAllocate); | 6 SchedDefineTask1(DataAllocate,dataAllocate); |
8 | 7 |
9 static int | 8 static int |
10 run(SchedTask *s, void *rbuf, void *wbuf) | 9 dataAllocate(SchedTask *s, void *rbuf, void *wbuf) |
11 { | 10 { |
12 | 11 |
13 int count = (int)s->get_param(0); | 12 long count = (long)s->get_param(0); |
14 for(int i=0;i<count;i++) { | 13 for(long i=0;i<count;i++) { |
15 void *idata = s->get_input(rbuf, i); | 14 void *idata = s->get_input(rbuf, i); |
16 long size = (long)s->get_param(i*2+1); | 15 long size = (long)s->get_param(i*2+1); |
17 long load_id = (long)s->get_param(i*2+2); | 16 long load_id = (long)s->get_param(i*2+2); |
18 | 17 |
19 void *buff = s->global_alloc(load_id, size); | 18 void *buff = s->global_alloc(load_id, size); |