summaryrefslogtreecommitdiff
path: root/src/radeon_exa_render.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@itt42.(none)>2009-09-01 15:22:57 +1000
committerDave Airlie <airlied@itt42.(none)>2009-09-01 15:22:57 +1000
commit22fbd6476f4b3513378e848affc4dd269e9d4498 (patch)
tree0e543ff27b6ba566f48355b25bd83f3b224ea4bb /src/radeon_exa_render.c
parenta32384f9b9ed73c14484a380dfa14652ed478ad6 (diff)
r100/r200: seriously WRAP is illegal for rectangular textures
unless we scale all the bos up to POT
Diffstat (limited to 'src/radeon_exa_render.c')
-rw-r--r--src/radeon_exa_render.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 69d81400..c3beadc3 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -415,7 +415,10 @@ static Bool FUNC_NAME(R100TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
switch (repeatType) {
case RepeatNormal:
- txfilter |= RADEON_CLAMP_S_WRAP | RADEON_CLAMP_T_WRAP;
+ if (txformat & RADEON_TXFORMAT_NON_POWER2)
+ txfilter |= RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST;
+ else
+ txfilter |= RADEON_CLAMP_S_WRAP | RADEON_CLAMP_T_WRAP;
break;
case RepeatPad:
txfilter |= RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST;
@@ -799,7 +802,10 @@ static Bool FUNC_NAME(R200TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
switch (repeatType) {
case RepeatNormal:
- txfilter |= R200_CLAMP_S_WRAP | R200_CLAMP_T_WRAP;
+ if (txformat & R200_TXFORMAT_NON_POWER2)
+ txfilter |= R200_CLAMP_S_CLAMP_LAST | R200_CLAMP_T_CLAMP_LAST;
+ else
+ txfilter |= R200_CLAMP_S_WRAP | R200_CLAMP_T_WRAP;
break;
case RepeatPad:
txfilter |= R200_CLAMP_S_CLAMP_LAST | R200_CLAMP_T_CLAMP_LAST;