annotate Renderer/Engine/spe/DataAllocate.cc @ 915:aa9728394194 draft

create_polygon_task ..not worked yet.
author yutaka@localhost.localdomain
date Fri, 23 Jul 2010 18:05:40 +0900
parents Renderer/Engine/spe/DataLoad.cc@c3b4ddd4ccdc
children b3a8545eb2fa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
749
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
1 #include <stdio.h>
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
2 #include <string.h>
915
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
3 #include "DataAllocate.h"
749
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
4 #include "Func.h"
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
5
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
6 /* これは必須 */
915
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
7 SchedDefineTask(DataAllocate);
749
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
8
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
9 static int
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
10 run(SchedTask *s, void *rbuf, void *wbuf)
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
11 {
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
12
915
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
13 void *idata = s->get_input(rbuf, 0);
823
c3b4ddd4ccdc 64bit (int) -> (long)
tkaito
parents: 792
diff changeset
14 long size = (long)s->get_param(0);
c3b4ddd4ccdc 64bit (int) -> (long)
tkaito
parents: 792
diff changeset
15 long load_id = (long)s->get_param(1);
749
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
16
915
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
17 void *buff = s->global_alloc(load_id, size);
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
18
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
19 if (idata != NULL) {
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
20 memcpy(buff,idata,size);
aa9728394194 create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents: 823
diff changeset
21 }
749
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
22
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
23 return 0;
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
24 }
115edac878e2 add DataLoad DataUpdate
hiroki
parents:
diff changeset
25