diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 0193a28..dcb2018 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -52,7 +52,7 @@ #define RINFO_FROM_SCREEN(pScr) ScrnInfoPtr pScrn = xf86Screens[pScr->myNum]; \ RADEONInfoPtr info = RADEONPTR(pScrn) -#define RADEON_TRACE_FALL 0 +#define RADEON_TRACE_FALL 1 #define RADEON_TRACE_DRAW 0 #if RADEON_TRACE_FALL diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index f519a3e..6f9891d 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -317,6 +317,49 @@ static Bool RADEONSetupSourceTile(PicturePtr pPict, return TRUE; } +/* + * REPEAT_NONE acts as if the texture is infinitely extended with alpha=0 pixels. + * You can't get that for r3/4/5xx because the border color register has the same + * format as the texture source. + */ +// if (pPict->transform != 0 && !pPict->repeat && PICT_FORMAT_A(pPict->format) == 0) +/* Picture->transform is None + or Picture->transform.xx/xy are zero + and xy/yx are +/- 0x10000 or vice versa + and the translation components are integral */ +#if 1 +static Bool RADEONCheckPixelExactTransform(PicturePtr pPict) +{ + + if (pPict->transform == 0) + return TRUE; + + if (pPict->repeat) + return TRUE; + + if (PICT_FORMAT_A(pPict->format) != 0) + return TRUE; + + if ((((pPict->transform->matrix[0][0] == 0) && + (pPict->transform->matrix[1][1] == 0)) && + (((pPict->transform->matrix[0][1] == 0x10000) || + (pPict->transform->matrix[0][1] == -0x10000)) && + ((pPict->transform->matrix[0][1] == 0x10000) || + (pPict->transform->matrix[0][1] == -0x10000)) + )) || + (((pPict->transform->matrix[0][1] == 0) && + (pPict->transform->matrix[1][0] == 0)) && + (((pPict->transform->matrix[0][0] == 0x10000) || + (pPict->transform->matrix[0][0] == -0x10000)) && + ((pPict->transform->matrix[1][1] == 0x10000) || + (pPict->transform->matrix[1][1] == -0x10000)) + ))) + return TRUE; + + return FALSE; +} +#endif + /* R100-specific code */ static Bool R100CheckCompositeTexture(PicturePtr pPict, int unit) @@ -980,9 +1023,21 @@ static Bool R300CheckCompositeTexture(PicturePtr pPict, int unit, Bool is_r500) * matter. I have not, however, verified that the X server always does such * clipping. */ +#if 0 + if (pPict->transform != 0 && !pPict->repeat && PICT_FORMAT_A(pPict->format) == 0) { + ErrorF("transform:\n"); + ErrorF("%x %x %x\n", pPict->transform->matrix[0][0], pPict->transform->matrix[0][1], pPict->transform->matrix[0][2]); + ErrorF("%x %x %x\n", pPict->transform->matrix[1][0], pPict->transform->matrix[1][1], pPict->transform->matrix[1][2]); + ErrorF("%x %x %x\n", pPict->transform->matrix[2][0], pPict->transform->matrix[2][1], pPict->transform->matrix[2][2]); + + } +#endif + if (!RADEONCheckPixelExactTransform(pPict)) + RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); +#if 0 if (pPict->transform != 0 && !pPict->repeat && PICT_FORMAT_A(pPict->format) == 0) RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); - +#endif return TRUE; }