radeon exa/render bug?

John Clemens john at deater.net
Sun Feb 12 00:30:37 PST 2006


I think I found a buglet in radeon_exa_render.c:R100TextureSetup(). 
Unless I'm waay too tired, the test for a bad texture offset should 
happen before we set the byte-swap and MACRO_TILE control bits.  As 
it stands now, it looks like we always fall back if we have a Colortiling 
on, or a byte swapped texture format.   Patch attached.

But it doesn't solve my main issue. I'm looking at the ati driver for my 
iBook G3 (Radeon M6), trying to figure out what's causing corruption with 
EXA and Render acceleration.  A tiny screenshot of the corruption can be 
seen here: https://bugs.freedesktop.org/attachment.cgi?id=4299 .  The 
problem goes away if you turn off either render acceleration or EXA (or 
both).  If anyone has any ideas, I'm all ears.  Just please be patient, 
I've never worked on video drivers before, much less opengl.

Also, I'm assuming that there's no way to use colortiling on linux/ppc? 
because we have to use 'UseFBDev' for mode switching?

thanks,
john.c

-- 
John Clemens                      http://www.deater.net/john
john at deater.net      "I Hate Quotes" -- Samuel L. Clemens



--- 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 02:54:37.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);



More information about the xorg mailing list