summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-11-21 18:17:31 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-11-21 18:18:06 +0000
commit1c57a52a1f46e8401429955d8c96fd5095c9012a (patch)
tree8a87862d049392910c73c226eb97caf810ef8f55 /src
parent8da12a00ee653510e1f1a6fecb28dbb36faa8400 (diff)
sna: Assert that we do not replace a GPU bo with a proxy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c1
-rw-r--r--src/sna/sna_render.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index b38f80fe..57bf4cd1 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4668,6 +4668,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
DBG(("%s: caching upload for src bo\n",
__FUNCTION__));
assert(src_priv->gpu_damage == NULL);
+ assert(src_priv->gpu_bo == NULL);
kgem_proxy_bo_attach(src_bo, &src_priv->gpu_bo);
}
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 88b23823..c534f612 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -530,6 +530,7 @@ static struct kgem_bo *upload(struct sna *sna,
channel->height == pixmap->drawable.height) {
assert(priv->gpu_damage == NULL);
assert(DAMAGE_IS_ALL(priv->cpu_damage));
+ assert(priv->gpu_bo == NULL);
kgem_proxy_bo_attach(bo, &priv->gpu_bo);
}
}
@@ -1165,6 +1166,7 @@ sna_render_picture_extract(struct sna *sna,
if (priv) {
assert(priv->gpu_damage == NULL);
assert(DAMAGE_IS_ALL(priv->cpu_damage));
+ assert(priv->gpu_bo == NULL);
kgem_proxy_bo_attach(bo, &priv->gpu_bo);
}
}