diff options
Diffstat (limited to 'src/mesa/main')
-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 b10076875b..b946f3c69d 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); } |