From 42e2036cda6b76f2b64e28a81bdaa661e4cbffa5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 1 Nov 2011 20:56:48 +0000 Subject: [PATCH] sna: Use bo for scratch pixmaps allocated by the dix/mi routines Now that we have the rudiments of accelerated deep-plane copies, we can begin to benefit from using BO for the core dix/mi routines like ShmPutImage. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index d1340f14..4fc13372 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -60,6 +60,7 @@ #define USE_SPANS 0 #define USE_ZERO_SPANS 1 +#define USE_BO_FOR_SCRATCH_PIXMAP 1 DevPrivateKeyRec sna_pixmap_index; DevPrivateKey sna_window_key; @@ -345,7 +346,13 @@ static PixmapPtr sna_create_pixmap(ScreenPtr screen, width, height, depth, usage)); if (usage == CREATE_PIXMAP_USAGE_SCRATCH) +#if USE_BO_FOR_SCRATCH_PIXMAP + return sna_pixmap_create_scratch(screen, + width, height, depth, + I915_TILING_X); +#else return fbCreatePixmap(screen, width, height, depth, usage); +#endif if (usage == SNA_CREATE_SCRATCH) return sna_pixmap_create_scratch(screen,