summaryrefslogtreecommitdiff
path: root/src/radeon_exa_render.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-04-25 19:39:05 +1000
committerDave Airlie <airlied@linux.ie>2009-04-25 19:39:05 +1000
commit253731dce6ab25122f2eda559233c098536b7143 (patch)
tree442b87188f2ecec1ca7f7e695fc77e6009483f8e /src/radeon_exa_render.c
parent5998f262a52cb85b334fcc1fe24c7b2ae474ce93 (diff)
Revert "radeon: attempt to fix R clamping for repeat again"
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r--src/radeon_exa_render.c65
1 files changed, 35 insertions, 30 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 02bada4d..71f96523 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -1104,36 +1104,41 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
txfilter = (unit << R300_TX_ID_SHIFT);
- switch (pPict->repeatType) {
- case RepeatNormal:
- if (unit != 0 || !info->accel_state->need_src_tile_x)
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP);
- else
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL);
-
- if (unit != 0 || !info->accel_state->need_src_tile_y)
- txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP);
- else
- txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL);
-
- txfilter |= R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
- break;
- case RepeatPad:
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
- R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
- break;
- case RepeatReflect:
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_MIRROR) |
- R300_TX_CLAMP_T(R300_TX_CLAMP_MIRROR) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
- break;
- case RepeatNone:
- txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
- R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
- R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_BORDER);
- break;
- }
+ if (pPict->repeat) {
+ switch (pPict->repeatType) {
+ case RepeatNormal:
+ if (unit != 0 || !info->accel_state->need_src_tile_x)
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP);
+ else
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL);
+
+ if (unit != 0 || !info->accel_state->need_src_tile_y)
+ txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP);
+ else
+ txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL);
+
+ txfilter |= R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
+ break;
+ case RepeatPad:
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
+ R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_LAST);
+ break;
+ case RepeatReflect:
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_MIRROR) |
+ R300_TX_CLAMP_T(R300_TX_CLAMP_MIRROR) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_MIRROR);
+ break;
+ case RepeatNone:
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
+ R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
+ break;
+ }
+ } else
+ txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
+ R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL) |
+ R300_TX_CLAMP_R(R300_TX_CLAMP_CLAMP_GL);
switch (pPict->filter) {
case PictFilterNearest: