Mercurial > hg > Game > Cerium
changeset 1121:d6725e0a7b3e draft
get_segment test.
author | tkaito@henri |
---|---|
date | Fri, 28 Jan 2011 23:04:59 +0900 |
parents | 377c2dbd6e80 |
children | ec6b55aed337 |
files | Renderer/Engine/spe/CreateSpan.cc Renderer/Engine/spe/DrawSpan.cc TaskManager/kernel/schedule/Scheduler.cc |
diffstat | 3 files changed, 11 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/spe/CreateSpan.cc Fri Jan 28 03:37:16 2011 +0900 +++ b/Renderer/Engine/spe/CreateSpan.cc Fri Jan 28 23:04:59 2011 +0900 @@ -283,25 +283,22 @@ g->spack = g->send_spack; g->send_spack = tmp_spack; - smanager->dma_wait(SPAN_PACK_STORE); + //smanager->dma_wait(SPAN_PACK_STORE); smanager->dma_store(g->send_spack, (memaddr)spackList[g->prev_index], sizeof(SpanPack), SPAN_PACK_STORE); smanager->dma_load(g->spack, (memaddr)spackList[index], sizeof(SpanPack), SPAN_PACK_LOAD); + g->prev_index = index; } - + tmp_xpos = calc(vMid10->x - vMin->x ,div_y, i, vMin->x); tmp_end = calc(vMid->x - vMin->x ,div_y, i, vMin->x); tmp_z = calc(vMid10->z - vMin->z ,div_y, i, vMin->z); tmp_zpos = calc(vMid->z - vMin->z ,div_y, i, vMin->z); - if (index != g->prev_index) { - g->prev_index = index; - smanager->dma_wait(SPAN_PACK_LOAD); - } - - + smanager->dma_wait(SPAN_PACK_LOAD); + /** * 書き込む SpanPack が満杯だったら * メインメモリで allocate した領域 (next) を持ってきて @@ -362,8 +359,7 @@ end_tex_y = tmp_tey2; } - if (g->send_spack->info.size >= MAX_SIZE_SPAN) { - + if (g->send_spack->info.size >= MAX_SIZE_SPAN) { smanager->dma_wait(SPAN_PACK_LOAD); g->spack->init((index+1)*split_screen_h); } @@ -381,8 +377,6 @@ continue; } - //smanager->dma_wait(SPAN_PACK_LOAD); - Span *span = &g->spack->span[g->spack->info.size++]; span->x = x; @@ -462,6 +456,7 @@ do { __debug_spe("CreateSpan allocated 0x%x\n",(uint32)next_pp); + //next_pp = NULL; if (pp->next != NULL) { smanager->dma_load(next_pp, (memaddr)pp->next, sizeof(PolygonPack), POLYGON_PACK_LOAD);
--- a/Renderer/Engine/spe/DrawSpan.cc Fri Jan 28 03:37:16 2011 +0900 +++ b/Renderer/Engine/spe/DrawSpan.cc Fri Jan 28 23:04:59 2011 +0900 @@ -296,7 +296,7 @@ tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; TilePtr tile = smanager->get_segment(tex_addr,g->tileList); - smanager->wait_segment(tile); + smanager->wait_segment(tile); updateBuffer(g, zpos, rangex, localx, localy, tex_localx, tex_localy,
--- a/TaskManager/kernel/schedule/Scheduler.cc Fri Jan 28 03:37:16 2011 +0900 +++ b/TaskManager/kernel/schedule/Scheduler.cc Fri Jan 28 23:04:59 2011 +0900 @@ -384,13 +384,15 @@ { // memory segment のsizeをoverride する場合がある MemorySegment *s = hash->get(addr); +#if 1 if (s) { /* 既に load されている */ // this->printf("get_segement loaded %llx 0x%x size 0x%d\n",addr,s->data,size); m->moveToFirst(s); return s; } - +#endif + /* LRU なので、もっとも使われてない segment を上書きする */ s = m->getLast(); m->moveToFirst(s);