diff 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
line wrap: on
line diff
--- a/Renderer/Engine/task/DrawSpan.cc	Wed Dec 08 02:41:36 2010 +0900
+++ b/Renderer/Engine/task/DrawSpan.cc	Wed Dec 08 05:38:45 2010 +0900
@@ -267,6 +267,7 @@
     tex_ypos = (int)((span->tex_height-1) * tey);
 
     if (zpos < g->zRow[localx + (rangex*localy)]) {
+	if (!span->tex_addr) return -1; // broken case, I'd like to write some thing...
         tex_addr = getTile(tex_xpos, tex_ypos,
                            span->tex_width, (memaddr)span->tex_addr);
         tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL;
@@ -374,6 +375,7 @@
             int tex_localx;
             int tex_localy;
 
+	    if (!span->tex_addr) continue; // broken case, I'd like to write some thing...
             tex_addr = getTile(tex_xpos, tex_ypos,
                                span->tex_width, (memaddr)span->tex_addr);
             tex_localx = tex_xpos % TEXTURE_SPLIT_PIXEL;