comparison TaskManager/Test/test_render/spe/DrawSpan.cpp @ 266:5c9dbd54cd51

merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 04 Jun 2009 00:00:09 +0900
parents 54787f182881 d949e590da26
children 7f2b30acf311
comparison
equal deleted inserted replaced
183:54787f182881 266:5c9dbd54cd51
10 #define SPAN_PACK_LOAD 0 10 #define SPAN_PACK_LOAD 0
11 #define TEX_LOAD 1 11 #define TEX_LOAD 1
12 12
13 SchedDefineTask(DrawSpan); 13 SchedDefineTask(DrawSpan);
14 14
15 <<<<<<< local
15 static TileHashPtr hash; 16 static TileHashPtr hash;
17 =======
18 <<<<<<< local
19 static const int hashsize = 263;
20
21 static TilePtr hash_table[hashsize] = {NULL};
22
23 unsigned short PRIME[8] = {
24 0x002, 0x065, 0x0c7, 0x133, 0x191, 0x1f3, 0x259, 0x2bd,
25 };
26
27 >>>>>>> other
16 static TileListPtr tileList; 28 static TileListPtr tileList;
17 29
18 /** 30 /**
19 * テクスチャは、TEXTURE_SPLIT_PIXEL^2 のブロックに分割する 31 * テクスチャは、TEXTURE_SPLIT_PIXEL^2 のブロックに分割する
20 * 32 *
70 getTile(int tx, int ty, int tw, uint32 *tex_addr_top) 82 getTile(int tx, int ty, int tw, uint32 *tex_addr_top)
71 { 83 {
72 int block = get_tex_block(tx, ty, tw); 84 int block = get_tex_block(tx, ty, tw);
73 return tex_addr_top + block*TEXTURE_BLOCK_SIZE; 85 return tex_addr_top + block*TEXTURE_BLOCK_SIZE;
74 } 86 }
87 =======
88 static unsigned char *tex;
89 >>>>>>> other
75 90
76 void 91 void
77 DrawSpan::linebuf_init(int *buf, int x, int rgb) 92 DrawSpan::linebuf_init(int *buf, int x, int rgb)
78 { 93 {
79 for (int i = 0; i < x; i++) { 94 for (int i = 0; i < x; i++) {
144 float *zRow = (float*)smanager->get_input(1); 159 float *zRow = (float*)smanager->get_input(1);
145 int **linebuf = (int**)smanager->allocate(sizeof(int*)*rangey); 160 int **linebuf = (int**)smanager->allocate(sizeof(int*)*rangey);
146 161
147 for (int i = 0; i < rangey; i++) { 162 for (int i = 0; i < rangey; i++) {
148 linebuf[i] = (int*)smanager->get_output(i); 163 linebuf[i] = (int*)smanager->get_output(i);
164 <<<<<<< local
149 linebuf_init(linebuf[i], rangex, 0xffffffff); 165 linebuf_init(linebuf[i], rangex, 0xffffffff);
166 =======
167 <<<<<<< local
168 linebuf_init(linebuf[i], rangex, 0xffffff);
169 =======
170 //linebuf_init(linebuf[i], rangex, 0x00ff00ff);
171 linebuf_init(linebuf[i], rangex, 0);
172 >>>>>>> other
173 >>>>>>> other
150 } 174 }
151 175
152 do { 176 do {
153 /** 177 /**
154 * SpanPack->next が存在する場合、 178 * SpanPack->next が存在する場合、
256 next_spack = tmp_spack; 280 next_spack = tmp_spack;
257 } while (spack); 281 } while (spack);
258 282
259 free(free_spack); 283 free(free_spack);
260 free(linebuf); 284 free(linebuf);
261 285 <<<<<<< local
286 =======
287 free(zRow);
288 <<<<<<< local
289 =======
290 <<<<<<< local
291 free(tileList);
292 free(tilist);
293 free(next_tilist);
294 >>>>>>> other
295 >>>>>>> other
296
297 =======
298 free(tex);
299 >>>>>>> other
262 return 0; 300 return 0;
263 } 301 }