summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.com>2008-05-20 11:32:42 -0400
committerAlex Deucher <alex@botch2.com>2008-05-20 11:32:42 -0400
commit130e55738047f2a073bcc47e3e1400f7b694a81b (patch)
treeac219c5f59fa78c3431f071670830ffe85849b87 /src
parentcc9f510770700228e5d597c872e926a4e99bd950 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/radeon_exa_render.c16
1 files 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))