diff options
authorChris Wilson <>2011-09-25 09:56:16 +0100
committerChris Wilson <>2011-09-25 09:56:16 +0100
commit5154e281ed66334a8ff6342236c1203a1e4ac5a3 (patch)
parent46fedf0cf1a413381109c1de34619e84ad614b8a (diff)
sna/glyph: Avoid useless attempt at GPU glyph rendering to a1 destinations
The actual bug is a little involved as we don't damage the temporary glyph mask correctly presuming that we only hit GPU paths. However, should we fail to prepare the composite operation that paints the mask on to the destination, things fail horribly. One particular example is that wine like to create its own temporary a1 buffer for the glyphs (which we render to via another temporary mask...) which triggers the delayed fallback and then sw compositing with a random buffer. Reported-by: Roman Jarosz <> Bugzilla: Signed-off-by: Chris Wilson <>
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index e0ef3133..0f0dc09f 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1121,6 +1121,11 @@ sna_glyphs(CARD8 op,
goto fallback;
+ if (!is_gpu(dst->pDrawable)) {
+ DBG(("%s: fallback -- no destination bo\n", __FUNCTION__));
+ goto fallback;
+ }
if (too_small(dst->pDrawable) && !picture_is_gpu(src)) {
DBG(("%s: fallback -- too small (%dx%d)\n",
__FUNCTION__, dst->pDrawable->width, dst->pDrawable->height));