summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-11-16 08:25:17 -0700
committerBrian Paul <brianp@vmware.com>2009-11-16 08:25:17 -0700
commit652828ec0efd1a7d7a8b497e0324a7bd9f66fd17 (patch)
treee29f0a600ca70311a02f18978f708a0a8efa8ad3 /src/mesa/main
parenta719395b458ef59efe4e8746e390b006a0b8792b (diff)
mesa: check BaseLevel, MaxLevel in _mesa_GenerateMipmapEXT()
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/fbobject.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index a2264b0dbf..7b3599f932 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;