From f3e0ba4f65db2b85f89aa3868d153434bc41c811 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 14 Jan 2012 10:17:27 +0000 Subject: [PATCH] sna/gen5: Disable render glyphs_to_dst Processing more than a single rectangle using the CA path on ILK is extremely hit-or-miss, often resulting in the absence of the second primitive (ie. the glyphs are cleared but not added.) This is reminiscent of the complete breakage of the BRW shaders, none of which can handle more than a single rectangle. Signed-off-by: Chris Wilson --- src/sna/sna_glyphs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 71625b8b..95cc8c06 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -1233,11 +1233,16 @@ sna_glyphs(CARD8 op, goto fallback; } + _mask = mask; /* XXX discard the mask for non-overlapping glyphs? */ - if (!mask || + /* XXX more shader breakage?: CA to dst is fubar on ilk */ + if (sna->kgem.gen == 50 && !_mask) + _mask = list[0].format; + + if (!_mask || (((nlist == 1 && list->len == 1) || op == PictOpAdd) && - dst->format == (mask->depth << 24 | mask->format))) { + dst->format == (_mask->depth << 24 | _mask->format))) { if (glyphs_to_dst(sna, op, src, dst, src_x, src_y, @@ -1245,7 +1250,6 @@ sna_glyphs(CARD8 op, return; } - _mask = mask; if (!_mask) _mask = glyphs_format(nlist, list, glyphs); if (_mask) {