summaryrefslogtreecommitdiff
path: root/uxa/uxa-accel.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-21 09:55:55 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-24 18:31:16 +0100
commit80a9e64f50aeda6004e3aba1fbfdda50bb1f1c82 (patch)
treea9e39dec68ff4fd3b4d61a5c26cd7fc18b88a3b0 /uxa/uxa-accel.c
parent91f560034fc2695680d1208a78fc56d814b0da79 (diff)
uxa: Use temporary dest when target is too large for compositor
If the destination cannot fit into the 3D pipeline when we need to composite, we fallback to doing the operation on the CPU. This is very slow, and quite easy to trigger on i915 by plugging in an external display. An alternative is to extract the extents of the operation from the destination using the blitter which can usually handle much larger operations. This gives us a temporary target that can fit into the 3D pipeline and thus be accelerated, before copying back into the larger real destination. For x11perf this boosts glyph rendering on PineView, from 38kglyphs/s to 480kglyphs/s. Just a little shy of the native performance of 601kglyphs/s Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa-accel.c')
-rw-r--r--uxa/uxa-accel.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c
index 0528d796..77963f39 100644
--- a/uxa/uxa-accel.c
+++ b/uxa/uxa-accel.c
@@ -103,7 +103,7 @@ uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n,
goto solid;
}
- if (!uxa_screen->info->check_composite(PictOpSrc, src, NULL, dst)) {
+ if (!uxa_screen->info->check_composite(PictOpSrc, src, NULL, dst, 0, 0)) {
FreePicture(src, 0);
FreePicture(dst, 0);
goto solid;
@@ -586,17 +586,17 @@ uxa_copy_n_to_n(DrawablePtr pSrcDrawable,
int dst_off_x, dst_off_y;
PixmapPtr pSrcPixmap, pDstPixmap;
- if (uxa_screen->info->check_copy &&
- !uxa_screen->info->check_copy(pSrcDrawable, pDstDrawable,
- pGC ? pGC->alu : GXcopy,
- pGC ? pGC->planemask : FB_ALLONES))
- goto fallback;
-
pSrcPixmap = uxa_get_drawable_pixmap(pSrcDrawable);
pDstPixmap = uxa_get_drawable_pixmap(pDstDrawable);
if (!pSrcPixmap || !pDstPixmap)
goto fallback;
+ if (uxa_screen->info->check_copy &&
+ !uxa_screen->info->check_copy(pSrcPixmap, pDstPixmap,
+ pGC ? pGC->alu : GXcopy,
+ pGC ? pGC->planemask : FB_ALLONES))
+ goto fallback;
+
uxa_get_drawable_deltas(pSrcDrawable, pSrcPixmap, &src_off_x,
&src_off_y);
uxa_get_drawable_deltas(pDstDrawable, pDstPixmap, &dst_off_x,
@@ -1121,20 +1121,16 @@ uxa_fill_region_tiled(DrawablePtr pDrawable,
uxa_get_pixmap_first_pixel(pTile),
planemask, alu);
+ pPixmap = uxa_get_offscreen_pixmap(pDrawable, &xoff, &yoff);
+ if (!pPixmap || !uxa_pixmap_is_offscreen(pTile))
+ goto out;
+
if (uxa_screen->info->check_copy &&
- !uxa_screen->info->check_copy(&pTile->drawable, pDrawable, alu, planemask))
+ !uxa_screen->info->check_copy(pTile, pPixmap, alu, planemask))
return FALSE;
-
- pPixmap = uxa_get_drawable_pixmap(pDrawable);
- uxa_get_drawable_deltas(pDrawable, pPixmap, &xoff, &yoff);
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
- pPixmap = uxa_get_offscreen_pixmap(pDrawable, &xoff, &yoff);
-
- if (!pPixmap || !uxa_pixmap_is_offscreen(pTile))
- goto out;
-
if ((*uxa_screen->info->prepare_copy) (pTile, pPixmap, 1, 1, alu,
planemask)) {
while (nbox--) {