[patches] Fix broken Render implementation in several video drivers (radeonhd, mga, i128)

Thomas Jaeger thjaeger at gmail.com
Tue Feb 17 15:19:41 PST 2009


I'm trying to break the vicious cycle where cairo can't forward
composite operations with extend mode EXTEND_PAD to XRender because some
drivers don't implement it correctly and the drivers don't get fixed
because the bugs are not exposed by cairo.

The (trivial) fixes consist of just announcing that the driver doesn't
support the affected repeat modes, so that the server's software
fallback will be used.  This is good enough in practice and certainly
much better than the current client-side fallback that cairo is using:
If an application currently wants to upscale an image using a bilinear
filter this is what happens: It needs to enable EXTEND_PAD so that the
image borders are rendered correctly, so cairo will (1) fetch the
destination region from the server (nevermind that it's going to be
overwritten completely), (2) fetch the whole source image (even if only
a tiny part of it will be redrawn, as is the case when scrolling), (3)
scale the image in software and then (4) send it back to the server.
All of this will go over the wire, no shared memory is used.
It should come as no surprise that this is unacceptably slow, which for
example forces firefox to ditch bilinear filtering completely.

The following three drivers are still affected (bug reports: [1,2,3]):
-radeonhd, -mga and -i128.  Since -radeonhd shares most its exa code
with -ati, it can just use the same fix that is already in -ati [4], and
probably also take advantage of hardware acceleration that is present in
-ati now [5].  I'm attaching the patches for the other two drivers to
this email.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=19728
[2] https://bugs.freedesktop.org/show_bug.cgi?id=19839
[3] https://bugs.freedesktop.org/show_bug.cgi?id=20076
[4]
http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=7e54c4b8acafead8de5d0dd6fdc1b619f832dd6f
[5]
http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=fa8e5a4fc236f8f15f462cb0d6164b194a65a118
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i128.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20090217/3c76e9ae/attachment.bin 


More information about the xorg-devel mailing list