summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-02-18 16:12:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-02-18 16:12:14 +0000
commita03aba6f7f55577e29c6a3267528e2614016222d (patch)
tree40685c00b49cd8ba599545f6e27c1f0ff9987822 /src/sna
parent1f16d854264ea923303b79379266bd789fd9dd4d (diff)
sna: A couple more assertions that we forcibly attach pixmaps correctly
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_accel.c3
-rw-r--r--src/sna/sna_dri.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 12f078eb..b5e41eeb 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3041,6 +3041,9 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
sna_damage_all(&priv->cpu_damage,
pixmap->drawable.width,
pixmap->drawable.height);
+
+ assert(priv->gpu_bo == NULL);
+ assert(priv->gpu_damage == NULL);
}
assert(priv->gpu_damage == NULL || priv->gpu_bo);
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 5d5ea178..22b12f09 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -177,6 +177,7 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
assert(priv->flush == false);
assert(priv->cpu_damage == NULL);
+ assert(priv->gpu_bo);
assert(priv->gpu_bo->proxy == NULL);
assert(priv->gpu_bo->flush == false);