Mercurial > hg > Game > Cerium
comparison TaskManager/Test/test_render/task/DrawSpan.cpp @ 387:b6fce69839b5 draft
no compile error but not worked.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 06 Aug 2009 22:40:52 +0900 |
parents | da7b1e5b8449 |
children | 492e60453124 |
comparison
equal
deleted
inserted
replaced
386:da7b1e5b8449 | 387:b6fce69839b5 |
---|---|
166 { | 166 { |
167 uint32 *data = (uint32 *)tile->data; | 167 uint32 *data = (uint32 *)tile->data; |
168 return data[(TEXTURE_SPLIT_PIXEL)*ty+tx]; | 168 return data[(TEXTURE_SPLIT_PIXEL)*ty+tx]; |
169 } | 169 } |
170 | 170 |
171 #if 0 | |
171 /** | 172 /** |
172 * DrawSpan の再起動 (DrawSpanRenew 生成) | 173 * DrawSpan の再起動 (DrawSpanRenew 生成) |
173 * | 174 * |
174 * @param[in] spack 現在処理している SpanPack | 175 * @param[in] spack 現在処理している SpanPack |
175 * @param[in] cur_span_x span->length_x != 1 の時の Span の処理で | 176 * @param[in] cur_span_x span->length_x != 1 の時の Span の処理で |
212 smanager->wait_task(renew_task); | 213 smanager->wait_task(renew_task); |
213 | 214 |
214 // next_spack は free() するので wait する | 215 // next_spack は free() するので wait する |
215 smanager->dma_wait(SPAN_PACK_LOAD); | 216 smanager->dma_wait(SPAN_PACK_LOAD); |
216 } | 217 } |
218 #endif | |
217 | 219 |
218 void | 220 void |
219 DrawSpan::writebuffer(unsigned int display, int buf_width, int height, | 221 DrawSpan::writebuffer(unsigned int display, int buf_width, int height, |
220 int screen_width) | 222 int screen_width) |
221 { | 223 { |
308 span->tex_width, (memaddr)span->tex_addr); | 310 span->tex_width, (memaddr)span->tex_addr); |
309 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; | 311 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; |
310 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; | 312 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; |
311 | 313 |
312 #if USE_MEMHASH | 314 #if USE_MEMHASH |
313 TilePtr tile = smanager->get_segement(tex_addr, | 315 TilePtr tile = smanager->get_segment(tex_addr,tileList); |
314 sizeof(uint32)*TEXTURE_BLOCK_SIZE); | 316 smanager->wait_segment(tile); |
315 smanager->wait_segement(tileid); | |
316 #else | 317 #else |
317 TilePtr tile; | 318 TilePtr tile; |
318 if (!(tile = isAvailableTile(tex_addr))) { | 319 if (!(tile = isAvailableTile(tex_addr))) { |
319 tile = set_rgb(tex_addr, wait_tag); | 320 tile = set_rgb(tex_addr, wait_tag); |
320 smanager->dma_wait(wait_tag); | 321 smanager->dma_wait(wait_tag); |
420 tex_addr = getTile(tex_xpos, tex_ypos, | 421 tex_addr = getTile(tex_xpos, tex_ypos, |
421 span->tex_width, (memaddr)span->tex_addr); | 422 span->tex_width, (memaddr)span->tex_addr); |
422 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; | 423 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; |
423 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; | 424 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; |
424 #if USE_MEMHASH | 425 #if USE_MEMHASH |
425 TilePtr tile = smanager->get_segement(tex_addr, | 426 TilePtr tile = smanager->get_segment(tex_addr,tileList); |
426 sizeof(uint32)*TEXTURE_BLOCK_SIZE); | 427 smanager->wait_segment(tile); |
427 smanager->wait_segement(tile); | |
428 #else | 428 #else |
429 TilePtr tile; | 429 TilePtr tile; |
430 if (!(tile = isAvailableTile(tex_addr))) { | 430 if (!(tile = isAvailableTile(tex_addr))) { |
431 tile = set_rgb(tex_addr, wait_tag); | 431 tile = set_rgb(tex_addr, wait_tag); |
432 smanager->dma_wait(wait_tag); | 432 smanager->dma_wait(wait_tag); |