meta: Actually use mipmapping when generating mipmaps.
authorEric Anholt <eric@anholt.net>
Wed, 12 Jan 2011 18:12:00 +0000 (10:12 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 12 Jan 2011 19:08:07 +0000 (11:08 -0800)
With the change to not reset baselevel, this GL_LINEAR filtering was
resulting in generating mipmaps off of the base level instead of the
next higher detail level.  Fixes fbo-generatemipmap-filtering.

Reported by: Neil Roberts <neil@linux.intel.com>

src/mesa/drivers/common/meta.c

index 3e69991..fd12e4d 100644 (file)
@@ -2319,7 +2319,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
    }
    _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, mipmap->FBO);
 
-   _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+   _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE);
    _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);