diff options
author | Brian Paul <[email protected]> | 2009-11-16 08:14:23 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-11-16 08:18:03 -0700 |
commit | ecb03d75a2961b28ab3d90fdd5df768608fc9447 (patch) | |
tree | df612c1f0242f92f97508a0b70d214405477a109 /src/mesa/main/teximage.c | |
parent | d3a37d93aba86ebca697169a31d88c3ef0ce34b9 (diff) |
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.
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |