summaryrefslogtreecommitdiff
path: root/uxa/uxa.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-10 09:39:44 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-10 10:36:14 +0100
commitf52b6e832292c02c0010b19882e38e1097beeda0 (patch)
tree9da0d96b7d8a1917f0506095928bf5158d9e5e2f /uxa/uxa.h
parent848ab66384508c3ad3e5fb4884e4527f3ebd3bde (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.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/uxa/uxa.h b/uxa/uxa.h
index c7e5566a..32a86a96 100644
--- a/uxa/uxa.h
+++ b/uxa/uxa.h
@@ -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.
*