Mercurial > hg > Game > Cerium
comparison TaskManager/Test/test_render/spe/DrawSpan.cpp @ 192:6694da357750 draft
add example/renew_task
author | gongo@localhost.localdomain |
---|---|
date | Tue, 13 Jan 2009 10:41:05 +0900 |
parents | fe854a6ee9e2 |
children | 1ff24ca2f016 |
comparison
equal
deleted
inserted
replaced
191:4f85911aa183 | 192:6694da357750 |
---|---|
1 #include <stdlib.h> | 1 #include <stdlib.h> |
2 #include <string.h> | 2 #include <string.h> |
3 #include <spu_mfcio.h> | |
3 #include "DrawSpan.h" | 4 #include "DrawSpan.h" |
4 #include "polygon_pack.h" | 5 #include "polygon_pack.h" |
5 #include "texture.h" | 6 #include "texture.h" |
6 #include "viewer_types.h" | 7 #include "viewer_types.h" |
7 #include "Func.h" | 8 #include "Func.h" |
171 SpanPackPtr curr = (SpanPackPtr)smanager->allocate(sizeof(SpanPack)); | 172 SpanPackPtr curr = (SpanPackPtr)smanager->allocate(sizeof(SpanPack)); |
172 memcpy(curr, spack, sizeof(SpanPack)); | 173 memcpy(curr, spack, sizeof(SpanPack)); |
173 renew_task->add_param((int)curr); | 174 renew_task->add_param((int)curr); |
174 renew_task->add_param(cur_span_x); | 175 renew_task->add_param(cur_span_x); |
175 | 176 |
177 fprintf(stderr, "[%p] start %u\n", | |
178 curr, spu_readch(SPU_RdDec)); | |
179 | |
176 /** | 180 /** |
177 * 再起動したタスクを待つ | 181 * 再起動したタスクを待つ |
178 */ | 182 */ |
179 smanager->wait_task(renew_task); | 183 smanager->wait_task(renew_task); |
180 | 184 |
280 * Tile が無い場合、一旦タスクはここで中断し、 | 284 * Tile が無い場合、一旦タスクはここで中断し、 |
281 * Tile をロードするタスクを走らせた後に再起動する | 285 * Tile をロードするタスクを走らせた後に再起動する |
282 */ | 286 */ |
283 if (!isAvailableTile(tex_addr)) { | 287 if (!isAvailableTile(tex_addr)) { |
284 spack->info.start = t; | 288 spack->info.start = t; |
285 //set_rgb(tex_addr); | 289 set_rgb(tex_addr); |
286 set_rgbs(tex_addr, | 290 //set_rgbs(tex_addr, |
287 getTile(span->tex_width-1, tex_ypos, | 291 //getTile(span->tex_width-1, tex_ypos, |
288 span->tex_width, span->tex_addr)); | 292 //span->tex_width, span->tex_addr)); |
289 reboot(spack, 0); | 293 //reboot(spack, 0); |
290 goto FINISH; | 294 //goto FINISH; |
291 } | 295 } |
292 | 296 |
293 rgb = get_rgb(tex_localx, tex_localy, tex_addr); | 297 rgb = get_rgb(tex_localx, tex_localy, tex_addr); |
294 | 298 |
295 zRow[localx + (rangex * localy)] = zpos; | 299 zRow[localx + (rangex * localy)] = zpos; |