From 652828ec0efd1a7d7a8b497e0324a7bd9f66fd17 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 16 Nov 2009 08:25:17 -0700 Subject: mesa: check BaseLevel, MaxLevel in _mesa_GenerateMipmapEXT() --- src/mesa/main/fbobject.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index a2264b0dbfe..7b3599f9322 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1962,6 +1962,11 @@ _mesa_GenerateMipmapEXT(GLenum target) texObj = _mesa_get_current_tex_object(ctx, target); + if (texObj->BaseLevel >= texObj->MaxLevel) { + /* nothing to do */ + return; + } + _mesa_lock_texture(ctx, texObj); if (target == GL_TEXTURE_CUBE_MAP) { GLuint face; -- cgit v1.2.3