xf86-video-ati: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Mon Aug 31 22:24:34 PDT 2009


 src/radeon_exa_render.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 22fbd6476f4b3513378e848affc4dd269e9d4498
Author: Dave Airlie <airlied at itt42.(none)>
Date:   Tue Sep 1 15:22:57 2009 +1000

    r100/r200: seriously WRAP is illegal for rectangular textures
    
    unless we scale all the bos up to POT

diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 69d8140..c3beadc 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;


More information about the xorg-commit mailing list