[PATCH] Avoid an unwanted pixmap migration in EXA when compositing trapezoids

Fredrik Höglund fredrik at kde.org
Wed Aug 15 10:58:56 PDT 2007


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: exa.patch
Type: text/x-diff
Size: 6113 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20070815/b55c7e58/attachment.patch>


More information about the xorg mailing list