Index: exa.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/exa/exa.c,v retrieving revision 1.46 diff -u -r1.46 exa.c --- exa.c 18 Apr 2006 19:14:07 -0000 1.46 +++ exa.c 17 May 2006 05:07:54 -0000 @@ -204,7 +204,7 @@ pExaPixmap->fb_ptr = NULL; if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) - pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8; + pExaPixmap->fb_pitch = (w != 0) ? (1 << (exaLog2(w - 1) + 1)) * bpp / 8 : 0; else pExaPixmap->fb_pitch = w * bpp / 8; pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, Index: exa_render.c =================================================================== RCS file: /cvs/xorg/xserver/xorg/exa/exa_render.c,v retrieving revision 1.32 diff -u -r1.32 exa_render.c --- exa_render.c 27 Apr 2006 20:27:27 -0000 1.32 +++ exa_render.c 17 May 2006 05:07:55 -0000 @@ -282,8 +282,12 @@ return -1; } - exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, - pDst->format); + if (!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, + pDst->format)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel)) { @@ -465,7 +469,7 @@ ExaScreenPriv (pDst->pDrawable->pScreen); assert(op == PictOpOver); - assert(pMask->componentAlpha == TRUE); + /* assert(pMask->componentAlpha == TRUE); */ if (pExaScr->info->CheckComposite && (!(*pExaScr->info->CheckComposite)(PictOpOutReverse, pSrc, pMask, @@ -573,16 +577,26 @@ if (pExaScr->info->PrepareComposite && !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { + Bool isSrcSolid; + ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); if (ret == 1) goto done; + /* For generic masks and solid src pictures, mach64 can do Over in + * two passes, similar to the component-alpha case. + */ + isSrcSolid = pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1 && + pSrc->repeat; + /* If we couldn't do the Composite in a single pass, and it was a * component-alpha Over, see if we can do it in two passes with * an OutReverse and then an Add. */ - if (ret == -1 && pMask && pMask->componentAlpha && op == PictOpOver) { + if (ret == -1 && op == PictOpOver && pMask && + (pMask->componentAlpha || isSrcSolid)) { ret = exaTryComponentAlphaHelper(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height);