From 130e55738047f2a073bcc47e3e1400f7b694a81b Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 20 May 2008 11:32:42 -0400 Subject: R3/4/5xx: fix EXA rotation xrandr uses PictOpSrc for rotation which we were falling back on since render semanties require alpha=0 for REPEAT_NONE when there is no alpha channel and there is a transform. If the dst has no alpha channel we should be ok I think. Otayler and I discussed this on IRC. the more general fix would be to clip the dst to the src and mask for bounded ops like in/add/over in the pixel exact transform case. --- src/radeon_exa_render.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 99a59e64..04c3719e 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -938,7 +938,11 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture, #ifdef ONLY_ONCE -static Bool R300CheckCompositeTexture(PicturePtr pPict, int unit, Bool is_r500) +static Bool R300CheckCompositeTexture(PicturePtr pPict, + PicturePtr pDstPict, + int op, + int unit, + Bool is_r500) { int w = pPict->pDrawable->width; int h = pPict->pDrawable->height; @@ -980,8 +984,10 @@ 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 (pPict->transform != 0 && !pPict->repeat && PICT_FORMAT_A(pPict->format) == 0) - RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); + if (pPict->transform != 0 && !pPict->repeat && PICT_FORMAT_A(pPict->format) == 0) { + if (((op != PictOpSrc) || (op != PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) != 0)) + RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); + } return TRUE; } @@ -1157,11 +1163,11 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP } } - if (!R300CheckCompositeTexture(pMaskPicture, 1, IS_R500_3D)) + if (!R300CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1, IS_R500_3D)) return FALSE; } - if (!R300CheckCompositeTexture(pSrcPicture, 0, IS_R500_3D)) + if (!R300CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0, IS_R500_3D)) return FALSE; if (!R300GetDestFormat(pDstPicture, &tmp1)) -- cgit v1.2.3