summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-05 10:34:08 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-05 11:50:26 +0000
commitdbb495c3aeef34eab2aabfdfaafb81facdea4100 (patch)
treec915bcf14ec779f08a14aa8dbfdcd4ae892cbe6a
parent292097590ba0f81b7505aedb2a4fbd18021641a5 (diff)
sna: Attach to the pixmap for source counting when deferring uploads
If we decide to defer the upload for this instance of the source pixmap, mark it so. Then if we do use it again we will upload it to a GPU bo and hopefully reuse those pixels. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index f633daa1..8355d409 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -323,7 +323,7 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box)
pixmap->drawable.width,
pixmap->drawable.height,
pixmap->drawable.bitsPerPixel) == I915_TILING_NONE) {
- priv = sna_pixmap(pixmap);
+ priv = sna_pixmap_attach(pixmap);
upload = priv && priv->source_count++ > SOURCE_BIAS;
}
@@ -340,7 +340,7 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box)
return FALSE;
count = SOURCE_BIAS;
- priv = sna_pixmap(pixmap);
+ priv = sna_pixmap_attach(pixmap);
if (priv)
count = priv->source_count++;