Module: Mesa
Branch: master
Commit: bc578caefb29cb9d1720d51698e2cd23ee490c44
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc578caefb29cb9d1720d51698e2cd23ee490c44

Author: Francisco Jerez <curroje...@riseup.net>
Date:   Wed Aug  4 16:38:57 2010 +0200

dri/nouveau: Don't try to validate uninitialized teximages.

---

 src/mesa/drivers/dri/nouveau/nouveau_texture.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c 
b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 79b6757..442f4e8 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -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

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to