radeon exa/render bug?

John Clemens john at deater.net
Sun Feb 12 16:58:04 PST 2006


On Mon, 13 Feb 2006, Benjamin Herrenschmidt wrote:

>> I was waay too tired.  If this is correct, then the R200 code will also
>> need a similar fix.
>
> Still no patch ...
>
> Ben.

Apologies.  Attached updated patch fixes this for both in r100 and r200.

john.c
-------------- next part --------------
--- xf86-video-ati-6.5.7.3-orig/src/radeon_exa_render.c	2005-09-27 19:34:11.000000000 -0400
+++ xf86-video-ati-6.5.7.3/src/radeon_exa_render.c	2006-02-12 19:46:12.000000000 -0500
@@ -223,6 +223,11 @@
     txpitch = exaGetPixmapPitch(pPix);
     txoffset = exaGetPixmapOffset(pPix) + info->fbLocation;
 
+    if ((txoffset & 0x1f) != 0)
+	RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset));
+    if ((txpitch & 0x1f) != 0)
+	RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch));
+    
     for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++)
     {
 	if (R100TexFormats[i].fmt == pPict->format)
@@ -241,11 +246,6 @@
 	txformat |= RADEON_TXFORMAT_NON_POWER2;
     txformat |= unit << 24; /* RADEON_TXFORMAT_ST_ROUTE_STQX */
  
-    if ((txoffset & 0x1f) != 0)
-	RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset));
-    if ((txpitch & 0x1f) != 0)
-	RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch));
-
     switch (pPict->filter) {
     case PictFilterNearest:
 	txfilter = (RADEON_MAG_FILTER_NEAREST | RADEON_MIN_FILTER_NEAREST);
@@ -466,6 +466,11 @@
     txpitch = exaGetPixmapPitch(pPix);
     txoffset = exaGetPixmapOffset(pPix) + info->fbLocation;
 
+    if ((txoffset & 0x1f) != 0)
+	RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset));
+    if ((txpitch & 0x1f) != 0)
+	RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch));
+    
     for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++)
     {
 	if (R200TexFormats[i].fmt == pPict->format)
@@ -484,11 +489,6 @@
 	txformat |= R200_TXFORMAT_NON_POWER2;
     txformat |= unit << R200_TXFORMAT_ST_ROUTE_SHIFT;
 
-    if ((txoffset & 0x1f) != 0)
-	RADEON_FALLBACK(("Bad texture offset 0x%x\n", (int)txoffset));
-    if ((txpitch & 0x1f) != 0)
-	RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch));
-
     switch (pPict->filter) {
     case PictFilterNearest:
 	txfilter = (R200_MAG_FILTER_NEAREST |


More information about the xorg mailing list