Mercurial > hg > Game > Cerium
changeset 854:293fcceaac36 draft
may be need ppeManager
author | yutaka@localhost.localdomain |
---|---|
date | Wed, 09 Jun 2010 23:04:09 +0900 |
parents | 0718a4e40450 |
children | 641451e6a95b |
files | Renderer/Engine/viewer.cc Renderer/Test/universe.cc TaskManager/Cell/CellTaskManagerImpl.cc |
diffstat | 3 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Wed Jun 09 10:33:24 2010 +0900 +++ b/Renderer/Engine/viewer.cc Wed Jun 09 23:04:09 2010 +0900 @@ -568,14 +568,14 @@ int rangey = (starty + split_screen_h - 1 > this->height) ? this->height - starty + 1 : split_screen_h; -#if 1 +#if 0 int array_task_num = (this->width + split_screen_w - 1) / split_screen_w; HTaskPtr task_draw_array = manager->create_task_array(DrawSpan, array_task_num, 6, 1, rangey); Task *task_draw = 0; while (startx < this->width) { - + // Draw SpanPack task_draw = task_draw_array->next_task_array(DrawSpan,task_draw); @@ -601,8 +601,8 @@ endx = this->width; } - } - + } + task_draw_array->spawn_task_array(task_draw->next()); task_draw_array->set_cpu(SPE_ANY); task_next->wait_for(task_draw_array);
--- a/Renderer/Test/universe.cc Wed Jun 09 10:33:24 2010 +0900 +++ b/Renderer/Test/universe.cc Wed Jun 09 23:04:09 2010 +0900 @@ -47,6 +47,10 @@ SceneGraphPtr moon; sgroot->createFromXMLfile( "xml_file/universe.xml"); + sgroot->OnLightSysSwitch(); + SceneGraphPtr light = sgroot->getLight(0); + sgroot->OnLightSwitch(0); + light->xyz[2] -= 10; // SGList.h にある SceneGraph ID から SceneGraph を生成する earth = sgroot->createSceneGraph("Earth");
--- a/TaskManager/Cell/CellTaskManagerImpl.cc Wed Jun 09 10:33:24 2010 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.cc Wed Jun 09 23:04:09 2010 +0900 @@ -139,8 +139,8 @@ // SPE side do { poll(); - } while (activeTaskQueue->empty() && spe_running >0 ); - } while (!activeTaskQueue->empty() || spe_running >0); + } while (ppeManager->activeTaskQueue->empty() && spe_running >0 ); + } while (!ppeManager->activeTaskQueue->empty() || spe_running >0); if (!waitTaskQueue->empty()) { get_scheduler()->printf("Dead lock detected\n"); }