diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-10 09:39:44 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-10 10:36:14 +0100 |
commit | f52b6e832292c02c0010b19882e38e1097beeda0 (patch) | |
tree | 9da0d96b7d8a1917f0506095928bf5158d9e5e2f /uxa/uxa.h | |
parent | 848ab66384508c3ad3e5fb4884e4527f3ebd3bde (diff) |
uxa: Rearrange checking and preparing of composite textures.
x11perf regression caused by 2D driver
https://bugs.freedesktop.org/show_bug.cgi?id=28047
caused by
commit a7b800513fcc94e063dfd68d2f63b6bab7fae47d
uxa: Extract sub-region from in-memory buffers.
The issue is that as we extract the region prior to checking whether the
composite can in fact be accelerated, we perform expensive surplus
operations. This is particularly noticeable for ComponentAlpha text,
such as rgb10text. The solution here is to rearrange the
check_composite() prior to acquiring the sources, and only extracting
the subregion if the render path can not actually handle the texture.
Performance (on PineView):
a7b800513^: aa=68600 glyphs/s, rgb=29900 glyphs/s
a7b800513: aa=65700 glyphs/s, rgb=13200 glyphs/s
now: aa=66800 glyph/s, rgb=28800 glyphs/s
The residual lossage seems to be from the extra function call and
dixPrivate lookups. Hmm. More warning is the extremely low performance,
however the results are consistent so the improvement looks real...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa.h')
-rw-r--r-- | uxa/uxa.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -252,6 +252,19 @@ typedef struct _UxaDriver { PicturePtr pDstPicture); /** + * check_composite_texture() checks to see if a source to the composite + * operation can be used without midification. + * + * @param pScreen Screen + * @param pPicture Picture + * + * The check_composite_texture() call is recommended if prepare_composite() is + * implemented, but is not required. + */ + Bool(*check_composite_texture) (ScreenPtr pScreen, + PicturePtr pPicture); + + /** * prepare_composite() sets up the driver for doing a composite * operation described in the Render extension protocol spec. * |