From: Maciej Cencora Date: Sat, 14 Nov 2009 17:11:16 +0000 (+0100) Subject: radeon: return false on texture validation if texture isn't complete X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ad83aeccdc54beecf25f217e2dd24c8edf6d6767;p=mesa.git radeon: return false on texture validation if texture isn't complete --- diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c index f01136b9d41..0497fa7db50 100644 --- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c +++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c @@ -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);