dri/nouveau: Don't try to validate uninitialized teximages.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 4 Aug 2010 14:38:57 +0000 (16:38 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 4 Aug 2010 23:48:14 +0000 (01:48 +0200)
src/mesa/drivers/dri/nouveau/nouveau_texture.c

index 79b67575866af199439990a2bce498df4af829b5..442f4e899ee8c9f342f8b43d49c4f50da49b30c2 100644 (file)
@@ -183,10 +183,10 @@ teximage_fits(struct gl_texture_object *t, int level)
        struct nouveau_surface *s = &to_nouveau_texture(t)->surfaces[level];
        struct gl_texture_image *ti = t->Image[0][level];
 
-       return ti && (t->Target == GL_TEXTURE_RECTANGLE ||
-                     (s->bo && s->width == ti->Width &&
-                      s->height == ti->Height &&
-                      s->format == ti->TexFormat));
+       return ti && to_nouveau_teximage(ti)->surface.bo &&
+               (t->Target == GL_TEXTURE_RECTANGLE ||
+                (s->bo && s->format == ti->TexFormat &&
+                 s->width == ti->Width && s->height == ti->Height));
 }
 
 static GLboolean