xlib: use _mesa_generate_mipmap() for mipmap generation, not meta
authorBrian Paul <brianp@vmware.com>
Sat, 26 Jan 2013 17:58:37 +0000 (10:58 -0700)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Wed, 13 Feb 2013 17:46:40 +0000 (18:46 +0100)
commitf4e33c551df241bb07a457c67ed515fdad72b5b4
tree231b0eccdfac5e009c00ec58a5a0a2b2cc300652
parent8d38c7229827cf76a29f942725e1d907fd335dc1
xlib: use _mesa_generate_mipmap() for mipmap generation, not meta

The swrast fragment program interpreter has trouble computing the
right texture LOD because it doesn't have easy access to input
derivatives.  This causes the GLSL-based meta generate mipmap code
to fetch texels from the wrong mipmap level.

One possible fix would be to set the GL_TEXTURE_MIN/MAX_LOD parameters
to limit sampling from the right level.  But let's just use the
_mesa_generate_mipmap() fallback since it's a lot faster than using
the fragment shader interpreter.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=54240

Note: This is a candidate for the 9.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
(cherry picked from commit 89551ae04f4cf994c0f7f2ac3aef7e1c57936a29)
src/mesa/drivers/x11/xm_dd.c