comparison TaskManager/Test/test_render/spe/Load_Texture.cpp @ 109:5c194c71eca8

Cerium cvs version
author gongo@gendarme.local
date Wed, 12 Nov 2008 17:39:33 +0900
parents
children a52e193f9a42
comparison
equal deleted inserted replaced
108:6f3b3dd3c095 109:5c194c71eca8
1 #include <stdlib.h>
2 #include "Load_Texture.h"
3 #include "SchedTask.h"
4 #include "../spe/texture.h"
5 #include "Func.h"
6
7 /**
8 * 決めうちじゃなくて、
9 * create_task の時に param で渡せばおk
10 */
11 #define height 128
12 #define width 128
13
14 // byteperpixel = 3 width = 128 dma_height= 32
15 #define LOAD_SIZE 3*128*32
16 #define MAX_LOAD_SIZE 16384
17 #define USE_ARRAY 3
18
19 SchedDefineTask(LoadTexture);
20
21 int
22 LoadTexture::run(void *rbuf , void *wbuf)
23 {
24 int addr = get_param(0);
25
26 //タスクからタスクを生成
27 TaskPtr task = create_task(TASK_SET_TEXTURE);
28
29 // 16kbyte づつ送ってる
30 task->add_inData(addr, MAX_LOAD_SIZE);
31 task->add_inData(addr + MAX_LOAD_SIZE, MAX_LOAD_SIZE);
32 task->add_inData(addr + MAX_LOAD_SIZE*2, MAX_LOAD_SIZE);
33
34 wait_task(task);
35
36 return 0;
37 }