xf86-video-intel: src/sna/sna_render.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Nov 21 09:09:57 PST 2012
src/sna/sna_render.c | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit ee72375ecd4f6d6e756bc361fa512b6675309540
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Nov 21 17:08:53 2012 +0000
sna: Do not migrate uninitialised pixmaps
Reported-by: Jiri Slaby <jirislaby at gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 42cd8fb..47bc19d 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -423,6 +423,12 @@ move_to_gpu(PixmapPtr pixmap, const BoxRec *box, bool blt)
return priv->gpu_bo;
}
+ if (priv->cpu_damage == NULL) {
+ DBG(("%s: not migrating uninitialised pixmap\n",
+ __FUNCTION__));
+ return NULL;
+ }
+
if (pixmap->usage_hint) {
DBG(("%s: not migrating pixmap due to usage_hint=%d\n",
__FUNCTION__, pixmap->usage_hint));
@@ -520,6 +526,7 @@ static struct kgem_bo *upload(struct sna *sna,
channel->width == pixmap->drawable.width &&
channel->height == pixmap->drawable.height) {
assert(priv->gpu_damage == NULL);
+ assert(DAMAGE_IS_ALL(priv->cpu_damage));
kgem_proxy_bo_attach(bo, &priv->gpu_bo);
}
}
@@ -1154,6 +1161,7 @@ sna_render_picture_extract(struct sna *sna,
struct sna_pixmap *priv = sna_pixmap(pixmap);
if (priv) {
assert(priv->gpu_damage == NULL);
+ assert(DAMAGE_IS_ALL(priv->cpu_damage));
kgem_proxy_bo_attach(bo, &priv->gpu_bo);
}
}
More information about the xorg-commit
mailing list