[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#376132: xserver-xorg-video-ati: Very slow rendering of RGBA images



On Fri, 2006-06-30 at 20:25 +0300, Hasso Tepper wrote:
> Michel Dänzer wrote:
> > Does this also occur without Option "BackingStore" or with Option
> > "AccelMethod" "EXA"?
> 
> Removing "BackingStore" doesn't have any effect to the issue. 

Okay, it's generally a bad idea to enable it though.

> But EXA makes rendering RGBA images significantly faster - although not as 
> fast I'd expect to, there is no noticeable impact to scrolling these images in 
> Konqueror. 

Okay, do the attached patches extracted from the upstream git history
make a difference? They're the only substantial changes to the XAA code
since X.Org 7.0...

> EXA seems to have another performance problems though.

It definitely did in xserver 1.0. Should be better with 1.1, and we're
still making significant improvements upstream since then.


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

From 9db5d2dfc33e384ea4db1b7cbc377e0b05cfb3ff Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf@suse.de>
Date: Thu, 11 May 2006 10:18:08 +0000
Subject: [PATCH] Bug #4320: Improved XAA Composite fastpath.
---
 ChangeLog                |    5 +++++
 hw/xfree86/xaa/xaaPict.c |   19 +++++++++++++------
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9e131e7..9af4ff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-11  Matthias Hopf  <mhopf@suse.de>
+
+	* hw/xfree86/xaa/xaaPict.c: (XAAComposite):
+	Bug #4320: Improved XAA Composite fastpath.
+
 2006-05-10  Adam Jackson  <ajax@freedesktop.org>
 
 	* record/record.c:
diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index 847ccb2..f7c1f3d 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -507,12 +507,19 @@ XAAComposite (CARD8      op,
     XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
     XAA_RENDER_PROLOGUE(pScreen, Composite);
 
-    if((op == PictOpSrc) && !pMask && infoRec->pScrn->vtSema &&
-	infoRec->ScreenToScreenBitBlt &&
-        pSrc->pDrawable &&
-	DRAWABLE_IS_ON_CARD(pSrc->pDrawable) &&
-	DRAWABLE_IS_ON_CARD(pDst->pDrawable) &&
-	!pSrc->transform && !pSrc->repeat && (pSrc->format == pDst->format))
+    if(!pMask && infoRec->pScrn->vtSema &&
+       infoRec->ScreenToScreenBitBlt &&
+       pSrc->pDrawable &&
+       DRAWABLE_IS_ON_CARD(pSrc->pDrawable) &&
+       DRAWABLE_IS_ON_CARD(pDst->pDrawable) &&
+       !pSrc->transform &&
+       (!pSrc->repeat || (xSrc >= 0 && ySrc >= 0 &&
+			  xSrc+width<=pSrc->pDrawable->width &&
+			  ySrc+height<=pSrc->pDrawable->height)) &&
+       ((op == PictOpSrc && pSrc->format == pDst->format) ||
+	(op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap &&
+	 pSrc->format==pDst->format &&
+	 (pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8))))
     {
 	XAACompositeSrcCopy(pSrc, pDst, xSrc, ySrc, xDst, yDst, width, height);
     } else if(!pSrc->pDrawable || (pMask && !pMask->pDrawable) ||
-- 
1.4.0

From ea5e0eabd1303a55d8fc10f44d21a3d371ce8919 Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf@suse.de>
Date: Wed, 21 Jun 2006 17:08:51 +0200
Subject: [PATCH] Bug 4320: Fastpath corner case improvement for Composite.
---
 hw/xfree86/xaa/xaaPict.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/xaa/xaaPict.c b/hw/xfree86/xaa/xaaPict.c
index f7c1f3d..a1ff510 100644
--- a/hw/xfree86/xaa/xaaPict.c
+++ b/hw/xfree86/xaa/xaaPict.c
@@ -516,7 +516,10 @@ XAAComposite (CARD8      op,
        (!pSrc->repeat || (xSrc >= 0 && ySrc >= 0 &&
 			  xSrc+width<=pSrc->pDrawable->width &&
 			  ySrc+height<=pSrc->pDrawable->height)) &&
-       ((op == PictOpSrc && pSrc->format == pDst->format) ||
+       ((op == PictOpSrc &&
+	 ((pSrc->format==pDst->format) ||
+	  (pSrc->format==PICT_a8r8g8b8 && pDst->format==PICT_x8r8g8b8) ||
+	  (pSrc->format==PICT_a8b8g8r8 && pDst->format==PICT_x8b8g8r8))) ||
 	(op == PictOpOver && !pSrc->alphaMap && !pDst->alphaMap &&
 	 pSrc->format==pDst->format &&
 	 (pSrc->format==PICT_x8r8g8b8 || pSrc->format==PICT_x8b8g8r8))))
-- 
1.4.0


Reply to: