diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-17 11:57:07 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-10-17 11:57:07 +0100 |
commit | 2cbe79b85b46796d561105afa980e7a52f4f1889 (patch) | |
tree | 410bd8bde685ecc5dc92c928ad085e211bb22957 | |
parent | 606e18bd360d904a8aed01aef43644fb4a51d929 (diff) |
sna/gen3: Improve reduction of render operator to blt
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen3_render.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 1d4df785..4e24e033 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -3541,6 +3541,9 @@ gen3_render_fill_boxes_try_blt(struct sna *sna, uint8_t alu = GXcopy; uint32_t pixel; + if (dst_bo->tiling == I915_TILING_Y) + return FALSE; + if (!sna_get_pixel_from_rgba(&pixel, color->red, color->green, @@ -3549,17 +3552,22 @@ gen3_render_fill_boxes_try_blt(struct sna *sna, format)) return FALSE; + if (color->alpha >= 0xff00) { + if (op == PictOpOver) + op = PictOpSrc; + else if (op == PictOpOutReverse) + op = PictOpClear; + else if (op == PictOpAdd && + (color->red & color->green & color->blue) >= 0xff00) + op = PictOpSrc; + } + if (op == PictOpClear) { alu = GXclear; pixel = 0; op = PictOpSrc; } - if (op == PictOpOver) { - if ((pixel & 0xff000000) == 0xff000000) - op = PictOpSrc; - } - if (op != PictOpSrc) return FALSE; |