From d1a3bb1467429310f5d17bf6afbf2eeb043ae64d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 9 Jun 2011 14:51:49 +0100 Subject: [PATCH] sna: Prefer inactive buffers when creating a bo for a dirty pixmap As we will immediately attempt to replace it with an inactive when moving the data to the GPU, short-circuit that replacement. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 975799e1..6254d0cf 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -685,7 +685,7 @@ sna_pixmap_force_to_gpu(PixmapPtr pixmap) pixmap->drawable.height, pixmap->drawable.bitsPerPixel, sna_pixmap_choose_tiling(pixmap), - 0); + priv->cpu_damage ? CREATE_INACTIVE : 0); if (priv->gpu_bo == NULL) return NULL;