Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/viewer.cc @ 652:dbe137505f2e
bulk task list start.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Nov 2009 12:01:45 +0900 |
parents | 60aa3f241b10 |
children | e201be3f6897 b7376415fa5f |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Mon Nov 23 10:01:02 2009 +0900 +++ b/Renderer/Engine/viewer.cc Mon Nov 23 12:01:45 2009 +0900 @@ -148,11 +148,9 @@ task_next = manager->create_task(Dummy); + // ここは、Iterator を用意するべきだよね for (int i = 0; i < spe_num; i++) { task_tex = manager->create_task(LoadTexture); - /* - * ここはもう少しわかりやすい使い方がいいかもしれぬ。こんなもん? - */ task_tex->set_cpu((CPU_TYPE)((int)SPE_0 + i)); task_next->wait_for(task_tex); task_tex->spawn(); @@ -466,11 +464,7 @@ int index_end = (index_start + range >= spackList_length) ? spackList_length : index_start + range; - HTaskPtr task_create_sp = manager->create_task(CreateSpan); - task_create_sp->add_inData(ppack, sizeof(PolygonPack)); - task_create_sp->add_inData(spackList_ptr, - sizeof(SpanPack*)*spackList_length_align); - task_create_sp->add_inData(&spackList[index_start], sizeof(SpanPack)); + HTaskPtr task_create_sp = manager->create_task(CreateSpan); task_create_sp->set_param(0,index_start); @@ -486,6 +480,11 @@ task_create_sp->set_param(1,index_start*split_screen_h + 1); task_create_sp->set_param(2,index_end*split_screen_h); + task_create_sp->add_inData(ppack, sizeof(PolygonPack)); + task_create_sp->add_inData(spackList_ptr, + sizeof(SpanPack*)*spackList_length_align); + task_create_sp->add_inData(&spackList[index_start], sizeof(SpanPack)); + task_next->wait_for(task_create_sp); task_create_sp->wait_for(task_create_pp); @@ -519,11 +518,15 @@ if (spack->info.size > 0) { // Draw SpanPack task_draw = manager->create_task(DrawSpan); - task_draw->add_inData(spack, sizeof(SpanPack)); task_draw->set_param(0, (memaddr)&pixels[(startx-1) + this->width*(starty-1)]); task_draw->set_param(1,this->width); + task_draw->set_param(2,startx); + task_draw->set_param(3,endx); + task_draw->set_param(4,rangey); + + task_draw->add_inData(spack, sizeof(SpanPack)); for (int i = 0; i < rangey; i++) { task_draw->add_outData( @@ -539,9 +542,6 @@ break; } - task_draw->set_param(2,startx); - task_draw->set_param(3,endx); - task_draw->set_param(4,rangey); task_draw->set_cpu(SPE_ANY); task_next->wait_for(task_draw); task_draw->spawn();