From: Brian Paul Date: Mon, 16 Nov 2009 15:14:23 +0000 (-0700) Subject: mesa: added another check in check_gen_mipmap() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ecb03d75a2961b28ab3d90fdd5df768608fc9447;p=mesa.git mesa: added another check in check_gen_mipmap() We don't need to call ctx->Driver.GenerateMipmap() if we're updating a texture level >= MAX_LEVEL. --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b10076875bc..b946f3c69d7 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2035,7 +2035,9 @@ check_gen_mipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj, GLint level) { ASSERT(target != GL_TEXTURE_CUBE_MAP); - if (texObj->GenerateMipmap && level == texObj->BaseLevel) { + if (texObj->GenerateMipmap && + level == texObj->BaseLevel && + level < texObj->MaxLevel) { ASSERT(ctx->Driver.GenerateMipmap); ctx->Driver.GenerateMipmap(ctx, target, texObj); }