aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 121409b2260..f63114e7eb7 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -854,6 +854,12 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300)
texstate->filter0 |= R300_TX_WRAP_T(R300_TX_CLAMP_TO_EDGE);
}
+ /* The hardware doesn't like CLAMP and CLAMP_TO_BORDER
+ * for the 3rd coordinate if the texture isn't 3D. */
+ if (tex->b.b.b.target != PIPE_TEXTURE_3D) {
+ texstate->filter0 &= ~R300_TX_WRAP_R_MASK;
+ }
+
if (tex->tex.is_npot) {
/* NPOT textures don't support mip filter, unfortunately.
* This prevents incorrect rendering. */