From 097669cd728e612bf3e3c531b83892e37481ee7b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 8 Aug 2013 20:44:24 +0100 Subject: sna/dri: Do not create a scanout-capable buffer if not flipping Avoid paying the penalty of creating an uncached buffer if we never intend to flip to it. Signed-off-by: Chris Wilson --- src/sna/sna_dri.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 0083b524..1569251f 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -305,7 +305,8 @@ sna_dri_create_buffer(DrawablePtr draw, case DRI2BufferFakeFrontRight: bpp = draw->bitsPerPixel; if (draw->width == sna->front->drawable.width && - draw->height == sna->front->drawable.height) + draw->height == sna->front->drawable.height && + (sna->flags & SNA_NO_FLIP) == 0) flags |= CREATE_SCANOUT; DBG(("%s: creating back buffer %dx%d, suitable for scanout? %d\n", __FUNCTION__, -- cgit v1.2.3