summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-01-26 10:58:37 -0700
committerIan Romanick <[email protected]>2013-02-17 13:59:43 -0800
commit29e63455aa04f152d7e24488c1049d94d12ab315 (patch)
treeda221b9b23bbb5177863c76eda8e1e569380e299 /src
parent632a5a3a5b24a1c5c72a276b2ba1224af2fd7eb9 (diff)
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 <[email protected]> (cherry picked from commit 89551ae04f4cf994c0f7f2ac3aef7e1c57936a29)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/x11/xm_dd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index cdf06aa347c..cfbdeb5a827 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -34,6 +34,7 @@
#include "main/colormac.h"
#include "main/fbobject.h"
#include "main/macros.h"
+#include "main/mipmap.h"
#include "main/image.h"
#include "main/imports.h"
#include "main/mtypes.h"
@@ -869,6 +870,8 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
driver->MapRenderbuffer = xmesa_MapRenderbuffer;
driver->UnmapRenderbuffer = xmesa_UnmapRenderbuffer;
+ driver->GenerateMipmap = _mesa_generate_mipmap;
+
#if ENABLE_EXT_timer_query
driver->NewQueryObject = xmesa_new_query_object;
driver->BeginQuery = xmesa_begin_query;