From ad83aeccdc54beecf25f217e2dd24c8edf6d6767 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 14 Nov 2009 18:11:16 +0100 Subject: [PATCH] radeon: return false on texture validation if texture isn't complete --- src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.30.2