Mesa (master): intel: Enable stripping of texture borders.

Eric Anholt anholt at kemper.freedesktop.org
Wed Oct 26 12:44:22 PDT 2011


Module: Mesa
Branch: master
Commit: 96db07e28c165610b809a9fd88410a82a24a893e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=96db07e28c165610b809a9fd88410a82a24a893e

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Oct 17 14:34:52 2011 -0700

intel: Enable stripping of texture borders.

This replaces software rendering of textures with the deprecated
1-pixel border (which is always bad, since mipmapping is rather broken
in swrast, and GLSL 1.30 is unsupported) with hardware rendering that
just pretends there was never a border (so you have potential seams on
apps that actually intentionally used the 1-pixel borders, but correct
rendering otherwise).

This doesn't regress any piglit tests on gen6 (since the texwrap
border/bordercolor cases already failed due to broken border color
handling), but regresses texwrap border cases on original gen4 since
those end up sampling the border color instead of the border pixels.
It's a small price to pay for not thinking about texture borders any
more.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/drivers/dri/intel/intel_context.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 21cad61..501b00d 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -789,6 +789,8 @@ intelInitContext(struct intel_context *intel,
    if (intel->gen >= 6)
       ctx->Const.MaxClipPlanes = 8;
 
+   ctx->Const.StripTextureBorder = GL_TRUE;
+
    /* reinitialize the context point state.
     * It depend on constants in __struct gl_contextRec::Const
     */



More information about the mesa-commit mailing list