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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-01 20:56:48 +00:00
parent 45cc952994
commit 42e2036cda
1 changed files with 7 additions and 0 deletions

View File

@ -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,