xf86-video-ati: Branch 'master' - 2 commits

Michel Daenzer daenzer at kemper.freedesktop.org
Mon Apr 7 09:19:53 PDT 2008


 src/radeon_dri.h        |    2 +-
 src/radeon_exa_render.c |   19 ++++++++++++++++---
 src/radeon_reg.h        |    2 ++
 3 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit 0a96173cc38e506728d4c3f2dd383ba56e856578
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Mon Apr 7 18:15:34 2008 +0200

    Increase default CP timeout.
    
    Helps avoid spurious timeouts causing problems, see
    http://bugs.freedesktop.org/show_bug.cgi?id=15203 .

diff --git a/src/radeon_dri.h b/src/radeon_dri.h
index 3b54626..67892a6 100644
--- a/src/radeon_dri.h
+++ b/src/radeon_dri.h
@@ -46,7 +46,7 @@
 #define RADEON_DEFAULT_BUFFER_SIZE    2 /* MB (must be page aligned) */
 #define RADEON_DEFAULT_GART_TEX_SIZE  1 /* MB (must be page aligned) */
 
-#define RADEON_DEFAULT_CP_TIMEOUT     10000  /* usecs */
+#define RADEON_DEFAULT_CP_TIMEOUT     100000  /* usecs */
 
 #define RADEON_DEFAULT_PCI_APER_SIZE 32 /* in MB */
 
commit 255fbf465f5e7db2609a5a151bfa810249db52a0
Author: Owen W. Taylor <otaylor at fishsoup.net>
Date:   Thu Apr 3 02:25:41 2008 -0400

    Fix rendering of transformed sources for REPEAT_NONE with EXA on >= R300.
    
    Use the border color when possible, otherwise fall back to software.

diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 4e5ab81..a97b752 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -845,6 +845,17 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, int unit, Bool is_r500)
 	pPict->filter != PictFilterBilinear)
 	RADEON_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter));
 
+    /* for REPEAT_NONE, Render semantics are that sampling outside the source
+     * picture results in alpha=0 pixels. We can implement this with a border color
+     * *if* our source texture has an alpha channel, otherwise we need to fall
+     * back. If we're not transformed then we hope that upper layers have clipped
+     * rendering to the bounds of the source drawable, in which case it doesn't
+     * matter. I have not, however, verified that the X server always does such
+     * clipping.
+     */
+    if (pPict->transform != 0 && !pPict->repeat && PICT_FORMAT_A(pPict->format) == 0)
+	RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
+
     return TRUE;
 }
 
@@ -908,8 +919,8 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
       txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP) |
 		  R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP));
     else
-      txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) |
-		  R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST));
+      txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) |
+		  R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL));
 
     txfilter |= (unit << R300_TX_ID_SHIFT);
 
@@ -924,13 +935,15 @@ static Bool FUNC_NAME(R300TextureSetup)(PicturePtr pPict, PixmapPtr pPix,
 	RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter));
     }
 
-    BEGIN_ACCEL(6);
+    BEGIN_ACCEL(pPict->repeat ? 6 : 7);
     OUT_ACCEL_REG(R300_TX_FILTER0_0 + (unit * 4), txfilter);
     OUT_ACCEL_REG(R300_TX_FILTER1_0 + (unit * 4), 0);
     OUT_ACCEL_REG(R300_TX_FORMAT0_0 + (unit * 4), txformat0);
     OUT_ACCEL_REG(R300_TX_FORMAT1_0 + (unit * 4), txformat1);
     OUT_ACCEL_REG(R300_TX_FORMAT2_0 + (unit * 4), txpitch);
     OUT_ACCEL_REG(R300_TX_OFFSET_0 + (unit * 4), txoffset);
+    if (!pPict->repeat)
+	OUT_ACCEL_REG(R300_TX_BORDER_COLOR_0 + (unit * 4), 0);
     FINISH_ACCEL();
 
     if (pPict->transform != 0) {
diff --git a/src/radeon_reg.h b/src/radeon_reg.h
index dcfdbac..aebc7ac 100644
--- a/src/radeon_reg.h
+++ b/src/radeon_reg.h
@@ -4349,6 +4349,8 @@
 #       define R300_ENDIAN_SWAP_HALF_DWORD              (3 << 0)
 #       define R300_MACRO_TILE                          (1 << 2)
 
+#define R300_TX_BORDER_COLOR_0			        0x45c0
+
 #define R300_TX_ENABLE				        0x4104
 #       define R300_TEX_0_ENABLE                        (1 << 0)
 #       define R300_TEX_1_ENABLE                        (1 << 1)


More information about the xorg-commit mailing list