diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-21 09:55:55 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-24 18:31:16 +0100 |
commit | 80a9e64f50aeda6004e3aba1fbfdda50bb1f1c82 (patch) | |
tree | a9e39dec68ff4fd3b4d61a5c26cd7fc18b88a3b0 /src/i830_render.c | |
parent | 91f560034fc2695680d1208a78fc56d814b0da79 (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 'src/i830_render.c')
-rw-r--r-- | src/i830_render.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/i830_render.c b/src/i830_render.c index b0413c58..cba65eb3 100644 --- a/src/i830_render.c +++ b/src/i830_render.c @@ -340,8 +340,11 @@ static void i830_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit) } Bool -i830_check_composite(int op, PicturePtr source_picture, PicturePtr mask_picture, - PicturePtr dest_picture) +i830_check_composite(int op, + PicturePtr source_picture, + PicturePtr mask_picture, + PicturePtr dest_picture, + int width, int height) { ScrnInfoPtr scrn = xf86Screens[dest_picture->pDrawable->pScreen->myNum]; uint32_t tmp1; @@ -373,6 +376,23 @@ i830_check_composite(int op, PicturePtr source_picture, PicturePtr mask_picture, return FALSE; } + if (width > 2048 || height > 2048) { + intel_debug_fallback(scrn, "Operation is too large (%d, %d)\n", width, height); + return FALSE; + } + + return TRUE; +} + +Bool +i830_check_composite_target(PixmapPtr pixmap) +{ + if (pixmap->drawable.width > 2048 || pixmap->drawable.height > 2048) + return FALSE; + + if(!intel_check_pitch_3d(pixmap)) + return FALSE; + return TRUE; } |