xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Thu Dec 2 23:02:43 PST 2010


 src/evergreen_exa.c     |    3 +++
 src/r600_exa.c          |    3 +++
 src/radeon.h            |    1 +
 src/radeon_exa.c        |   12 ++++++++++++
 src/radeon_exa_render.c |    9 +++++++++
 5 files changed, 28 insertions(+)

New commits:
commit f074762fff4253a457cb48519bb33a2e2c90f8b9
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Fri Dec 3 01:25:41 2010 -0500

    radeon/exa: fallback for non-affine transforms
    
    We need to implement a texture lookup with perspective
    divide for non-affine transforms.  For now just fallback.
    Should fix:
    https://bugs.freedesktop.org/show_bug.cgi?id=31799
    although it appears either EXA or the xserver gets this
    wrong too.

diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 89afaff..19d52d8 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -863,6 +863,9 @@ static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict,
 	    RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
     }
 
+    if (!radeon_transform_is_affine(pPict->transform))
+	RADEON_FALLBACK(("non-affine transforms not supported\n"));
+
     return TRUE;
 }
 
diff --git a/src/r600_exa.c b/src/r600_exa.c
index f6cde1d..c458991 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -904,6 +904,9 @@ static Bool R600CheckCompositeTexture(PicturePtr pPict,
 	    RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
     }
 
+    if (!radeon_transform_is_affine(pPict->transform))
+	RADEON_FALLBACK(("non-affine transforms not supported\n"));
+
     return TRUE;
 }
 
diff --git a/src/radeon.h b/src/radeon.h
index 84d3563..25d026f 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -1276,6 +1276,7 @@ extern void RADEONPMFini(ScrnInfoPtr pScrn);
 #ifdef USE_EXA
 /* radeon_exa.c */
 extern Bool RADEONSetupMemEXA(ScreenPtr pScreen);
+extern Bool radeon_transform_is_affine(PictTransformPtr t);
 
 /* radeon_exa_funcs.c */
 extern void RADEONCopyCP(PixmapPtr pDst, int srcX, int srcY, int dstX,
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index 503d569..9c40da7 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -174,6 +174,18 @@ Bool RADEONGetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset)
 	return RADEONGetOffsetPitch(pPix, bpp, pitch_offset, offset, pitch);
 }
 
+/**
+ * Returns whether the provided transform is affine.
+ *
+ * transform may be null.
+ */
+Bool radeon_transform_is_affine(PictTransformPtr t)
+{
+	if (t == NULL)
+		return TRUE;
+	return t->matrix[2][0] == 0 && t->matrix[2][1] == 0;
+}
+
 #if X_BYTE_ORDER == X_BIG_ENDIAN
 
 static unsigned long swapper_surfaces[6];
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index da72416..2e13b00 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -379,6 +379,9 @@ static Bool R100CheckCompositeTexture(PicturePtr pPict,
 	    RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
     }
 
+    if (!radeon_transform_is_affine(pPict->transform))
+	RADEON_FALLBACK(("non-affine transforms not supported\n"));
+
     return TRUE;
 }
 
@@ -778,6 +781,9 @@ static Bool R200CheckCompositeTexture(PicturePtr pPict,
 	    RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
     }
 
+    if (!radeon_transform_is_affine(pPict->transform))
+	RADEON_FALLBACK(("non-affine transforms not supported\n"));
+
     return TRUE;
 }
 
@@ -1162,6 +1168,9 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict,
 	    RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n"));
     }
 
+    if (!radeon_transform_is_affine(pPict->transform))
+	RADEON_FALLBACK(("non-affine transforms not supported\n"));
+
     return TRUE;
 }
 


More information about the xorg-commit mailing list