xf86-video-intel: src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Nov 12 02:40:24 PST 2011
src/sna/sna_accel.c | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 991ffcb60a15f08ebb396d4d4ec86d5aff0ded31
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Fri Nov 11 23:20:36 2011 +0000
sna: Reset the source counter if we completely dirty the CPU pixmap
For a long lived pixmap which we are repeatedly using for upload and
copying to other pixmaps, we don't want to keep to maintain a GPU
buffer. So instead, reset the source counter if we discard the GPU bo
and treat the pixmap as purely CPU.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 561747d..2dc86ca 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -166,6 +166,9 @@ static void sna_pixmap_destroy_gpu_bo(struct sna *sna, struct sna_pixmap *priv)
{
kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
priv->gpu_bo = NULL;
+
+ /* and reset the upload counter */
+ priv->source_count = SOURCE_BIAS;
}
static Bool sna_destroy_private(PixmapPtr pixmap, struct sna_pixmap *priv)
More information about the xorg-commit
mailing list