aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-10-29 14:38:44 -0700
committerEric Anholt <[email protected]>2009-10-29 14:56:52 -0700
commit8a9afe71b8d89a2a967cb37f5b5b00d86de387bc (patch)
tree471a7a98e8bcbb86ad9b162e7ea4ce3beb277714 /src/mesa/drivers/dri/i915
parent4b377ae292f75645ef356bd3bfac407230faf73a (diff)
i915: Fix 1D texture mapping in the t coordinate.
Fixes piglit tex1d-2dborder test.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 0c29c558ec7..bea47f5af82 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -305,6 +305,12 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
GLenum wt = tObj->WrapT;
GLenum wr = tObj->WrapR;
+ /* We program 1D textures as 2D textures, so the 2D texcoord could
+ * result in sampling border values if we don't set the T wrap to
+ * repeat.
+ */
+ if (tObj->Target == GL_TEXTURE_1D)
+ wt = GL_REPEAT;
/* 3D textures don't seem to respect the border color.
* Fallback if there's ever a danger that they might refer to