projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b377ae
)
i915: Fix 1D texture mapping in the t coordinate.
author
Eric Anholt
<eric@anholt.net>
Thu, 29 Oct 2009 21:38:44 +0000
(14:38 -0700)
committer
Eric Anholt
<eric@anholt.net>
Thu, 29 Oct 2009 21:56:52 +0000
(14:56 -0700)
Fixes piglit tex1d-2dborder test.
src/mesa/drivers/dri/i915/i915_texstate.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i915/i915_texstate.c
b/src/mesa/drivers/dri/i915/i915_texstate.c
index 0c29c558ec741c9c9803fa615d1e5de365d2b519..bea47f5af821ac702d47c30ed72c3020698cec5e 100644
(file)
--- 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