comparison TaskManager/Test/test_render/spe/DrawSpan.cpp @ 188:fe854a6ee9e2 draft

メモりリーク箇所発見:TaskManager/Test/test_render/ChangeLog参照
author gongo@localhost.localdomain
date Thu, 08 Jan 2009 15:34:19 +0900
parents 06cdf8baa989
children 6694da357750
comparison
equal deleted inserted replaced
187:e9b5dcdae38d 188:fe854a6ee9e2
106 hash->put(tile->texture_addr, tile); 106 hash->put(tile->texture_addr, tile);
107 107
108 smanager->dma_load(tile->pixel, (uint32)addr, 108 smanager->dma_load(tile->pixel, (uint32)addr,
109 sizeof(uint32)*TEXTURE_BLOCK_SIZE, TEX_LOAD); 109 sizeof(uint32)*TEXTURE_BLOCK_SIZE, TEX_LOAD);
110 110
111 smanager->dma_wait(TEX_LOAD); 111 //smanager->dma_wait(TEX_LOAD);
112 } 112 }
113 } 113 }
114 114
115 void 115 void
116 DrawSpan::set_rgbs(uint32 *addr, uint32 *max_addr) 116 DrawSpan::set_rgbs(uint32 *addr, uint32 *max_addr)
117 { 117 {
118 uint32 start = (uint32)addr; 118 uint32 start = (uint32)addr;
119 uint32 end = (uint32)max_addr; 119 uint32 end = (uint32)max_addr;
120 uint32 length = end-start; 120 uint32 length = end-start;
121 uint32 diff = sizeof(uint32)*TEXTURE_BLOCK_SIZE; 121 uint32 diff = sizeof(uint32)*TEXTURE_BLOCK_SIZE;
122 uint32 max_tile = 8; 122 uint32 max_tile = 16;
123 123
124 for (uint32 i = 0, j = 0; i <= length && j < max_tile; i += diff, j++) { 124 for (uint32 i = 0, j = 0; i <= length && j < max_tile; i += diff, j++) {
125 set_rgb((uint32*)(start + i)); 125 set_rgb((uint32*)(start + i));
126 } 126 }
127 } 127 }
169 * ɥ쥹ϤΤNG 169 * ɥ쥹ϤΤNG
170 */ 170 */
171 SpanPackPtr curr = (SpanPackPtr)smanager->allocate(sizeof(SpanPack)); 171 SpanPackPtr curr = (SpanPackPtr)smanager->allocate(sizeof(SpanPack));
172 memcpy(curr, spack, sizeof(SpanPack)); 172 memcpy(curr, spack, sizeof(SpanPack));
173 renew_task->add_param((int)curr); 173 renew_task->add_param((int)curr);
174
175 renew_task->add_param(cur_span_x); 174 renew_task->add_param(cur_span_x);
176 175
177 /** 176 /**
178 * ƵưԤ 177 * ƵưԤ
179 */ 178 */
281 * Tile ̵硢öϤǤ 280 * Tile ̵硢öϤǤ
282 * Tile ɤ륿餻˺Ƶư 281 * Tile ɤ륿餻˺Ƶư
283 */ 282 */
284 if (!isAvailableTile(tex_addr)) { 283 if (!isAvailableTile(tex_addr)) {
285 spack->info.start = t; 284 spack->info.start = t;
286 set_rgb(tex_addr); 285 //set_rgb(tex_addr);
287 //set_rgbs(tex_addr, 286 set_rgbs(tex_addr,
288 //getTile(span->tex_width-1, tex_ypos, 287 getTile(span->tex_width-1, tex_ypos,
289 //span->tex_width, span->tex_addr)); 288 span->tex_width, span->tex_addr));
290 //reboot(spack, 0); 289 reboot(spack, 0);
291 //goto FINISH; 290 goto FINISH;
292 } 291 }
293 292
294 rgb = get_rgb(tex_localx, tex_localy, tex_addr); 293 rgb = get_rgb(tex_localx, tex_localy, tex_addr);
295 294
296 zRow[localx + (rangex * localy)] = zpos; 295 zRow[localx + (rangex * localy)] = zpos;