Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/task/DrawSpan.cc @ 1047:6a80ca9a65d9
broken texure ( h/w != 2^n ) protection
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Dec 2010 05:38:45 +0900 |
parents | 7fafe412c28f |
children |
comparison
equal
deleted
inserted
replaced
1046:8c75060eb153 | 1047:6a80ca9a65d9 |
---|---|
265 | 265 |
266 tex_xpos = (int)((span->tex_width-1) * tex); | 266 tex_xpos = (int)((span->tex_width-1) * tex); |
267 tex_ypos = (int)((span->tex_height-1) * tey); | 267 tex_ypos = (int)((span->tex_height-1) * tey); |
268 | 268 |
269 if (zpos < g->zRow[localx + (rangex*localy)]) { | 269 if (zpos < g->zRow[localx + (rangex*localy)]) { |
270 if (!span->tex_addr) return -1; // broken case, I'd like to write some thing... | |
270 tex_addr = getTile(tex_xpos, tex_ypos, | 271 tex_addr = getTile(tex_xpos, tex_ypos, |
271 span->tex_width, (memaddr)span->tex_addr); | 272 span->tex_width, (memaddr)span->tex_addr); |
272 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; | 273 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; |
273 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; | 274 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; |
274 | 275 |
372 // そのブロックのアドレス(MainMemory) | 373 // そのブロックのアドレス(MainMemory) |
373 memaddr tex_addr; | 374 memaddr tex_addr; |
374 int tex_localx; | 375 int tex_localx; |
375 int tex_localy; | 376 int tex_localy; |
376 | 377 |
378 if (!span->tex_addr) continue; // broken case, I'd like to write some thing... | |
377 tex_addr = getTile(tex_xpos, tex_ypos, | 379 tex_addr = getTile(tex_xpos, tex_ypos, |
378 span->tex_width, (memaddr)span->tex_addr); | 380 span->tex_width, (memaddr)span->tex_addr); |
379 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; | 381 tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL; |
380 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; | 382 tex_localy = tex_ypos % TEXTURE_SPLIT_PIXEL; |
381 TilePtr tile = smanager->get_segment(tex_addr,g->tileList); | 383 TilePtr tile = smanager->get_segment(tex_addr,g->tileList); |