X trapezoids rendering performance

Bernardo Innocenti bernie at codewiz.org
Sun Aug 19 23:47:41 EDT 2007


This patch is likely to make a big difference in the EXA codepath
I benchmarked, which is heavily used by the OLPC GTK theme.

The mini-benchmark attached to #1837 mimics it by drawing rounded
edges shapes with Cairo.

Aleph, a hacker from Italy, is also trying to improve rendering
performance on the OLPC.  I asked him to experiment with this
patch and tell us what happens.

-------- Original Message --------
Subject: [PATCH] Avoid an unwanted pixmap migration in EXA when compositing trapezoids
Date: Wed, 15 Aug 2007 19:58:56 +0200
From: Fredrik Höglund <fredrik at kde.org>
Reply-To: fredrik at kde.org
To: xorg at lists.freedesktop.org

Hi,

This patch solves the trapezoid migration problem Michel Dänzer described
in a recent email on this mailing list.

miTrapezoids creates an alpha pixmap and initializes the contents using
PolyFillRect, which causes the pixmap to be moved in for acceleration.
The subsequent call(s) to RasterizeTrapezoid won't be accelerated by
EXA, which forces the pixmap to be migrated out again.

This patch avoids the problem by wrapping Trapezoids in EXA, and using
ExaCheckPolyFillRect to initialize the pixmap contents.

The code for exaTrapezoids and exaCreateAlphaPicture is copied from
miTrapezoids and miCreateAlphaPicture. The only change is the call to
ExaCheckPolyFillRect.

I'd like to commit this patch as a temporary solution for the 1.4 release.
I expect it to be replaced later by the generic solution Michel is
working on.

Here are some numbers when compositing a single 256x256 trapezoid
10000 times on a pixmap before and after the patch is applied.
This is with the master branch of the ATI driver and an R200.

Before:
--------------------------------------------------------------
10000 trapezoids, 37.835 seconds, 264.306 trapezoids / second.
10000 trapezoids, 37.819 seconds, 264.417 trapezoids / second.
10000 trapezoids, 37.828 seconds, 264.354 trapezoids / second.

After:
--------------------------------------------------------------
10000 trapezoids, 3.841 seconds, 2603.49 trapezoids / second.
10000 trapezoids, 3.796 seconds, 2634.35 trapezoids / second.
10000 trapezoids, 3.792 seconds, 2637.13 trapezoids / second.

Regards,
Fredrik



-- 
   // Bernardo Innocenti
 \X/  http://www.codewiz.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exa.patch
Type: text/x-diff
Size: 6114 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20070819/846565f2/attachment.patch>


More information about the Devel mailing list