radeon: return false on texture validation if texture isn't complete
authorMaciej Cencora <m.cencora@gmail.com>
Sat, 14 Nov 2009 17:11:16 +0000 (18:11 +0100)
committerMaciej Cencora <m.cencora@gmail.com>
Sat, 14 Nov 2009 17:11:16 +0000 (18:11 +0100)
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c

index f01136b9d4189110262e77dd585dde5b667dfae7..0497fa7db502f9b375694a4b708ddc1e1881e7ea 100644 (file)
@@ -34,7 +34,6 @@
 #include "main/simple_list.h"
 #include "main/texcompress.h"
 #include "main/teximage.h"
-/* TODO: remove if texture completeness check is removed */
 #include "main/texobj.h"
 #include "radeon_texture.h"
 
@@ -547,9 +546,10 @@ int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *t
        if (texObj->Image[0][texObj->BaseLevel]->Border > 0)
                return GL_FALSE;
 
-       /* TODO: is this really necessary? */
        _mesa_test_texobj_completeness(rmesa->glCtx, texObj);
-       assert(texObj->_Complete);
+       if (!texObj->_Complete) {
+               return GL_FALSE;
+       }
 
        calculate_min_max_lod(&t->base, &t->minLod, &t->maxLod);