[PATCH xserver] EXA: Avoid GPU memory readback for PolyGlyphBlt fallbacks.

Michel Dänzer michel at daenzer.net
Tue May 17 07:05:26 PDT 2011


On Die, 2011-05-17 at 15:03 +0200, Michel Dänzer wrote: 
> From: Michel Dänzer <daenzer at vmware.com>
> 
> Signed-off-by: Michel Dänzer <daenzer at vmware.com>
> ---
>  exa/exa_unaccel.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
> index 5d26b77..2bdaede 100644
> --- a/exa/exa_unaccel.c
> +++ b/exa/exa_unaccel.c
> @@ -344,10 +344,19 @@ ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
>  		     int x, int y, unsigned int nglyph,
>  		     CharInfoPtr *ppci, pointer pglyphBase)
>  {
> +    PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
> +    ExaPixmapPriv(pPixmap);
> +
>      EXA_PRE_FALLBACK_GC(pGC);
>      EXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable,
>  		  exaDrawableLocation(pDrawable), pGC->fillStyle, pGC->alu));
> -    exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
> +    if (!pExaScr->prepare_access_reg || !pExaPixmap->pDamage ||
> +	exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
> +			      pGC->alu, pGC->clientClipType))
> +	exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
> +    else
> +	pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST,
> +				    DamagePendingRegion(pExaPixmap->pDamage));
>      exaPrepareAccessGC (pGC);
>      pGC->ops->PolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
>      exaFinishAccessGC (pGC);

Never mind, this breaks the x11perf status line.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list