diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-22 13:36:16 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-03-22 13:36:16 +0000 |
commit | 88b6b80c2a5191717f0baeb22cdb70ee8c993e09 (patch) | |
tree | 2efe1e0ca2e67c3c04fc43ba5c0c7a6cab824c61 | |
parent | ccd6b7e402e731c73163b132a80ae29ae2911613 (diff) |
sna: Fix assertions that the pixmap points into the CPU bo for fallbacks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 67cd276a..be58fff7 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1691,6 +1691,7 @@ skip_inplace_map: assert(IS_CPU_MAP(priv->gpu_bo->map)); kgem_bo_sync__cpu_full(&sna->kgem, priv->gpu_bo, FORCE_FULL_SYNC || flags & MOVE_WRITE); + assert(pixmap->devPrivate.ptr == ((unsigned long)priv->cpu_bo->map & ~3)); assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->gpu_bo)); assert_pixmap_damage(pixmap); DBG(("%s: operate inplace (CPU)\n", __FUNCTION__)); @@ -1719,7 +1720,7 @@ skip_inplace_map: if (priv->cpu_bo) { DBG(("%s: syncing CPU bo\n", __FUNCTION__)); kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo); - assert(pixmap->devPrivate.ptr == ((unsigned long)priv->cpu_bo->map) & ~3); + assert(pixmap->devPrivate.ptr == ((unsigned long)priv->cpu_bo->map & ~3)); } if (priv->clear_color == 0 || pixmap->drawable.bitsPerPixel == 8) { @@ -1803,6 +1804,7 @@ done: assert(IS_CPU_MAP(priv->cpu_bo->map)); kgem_bo_sync__cpu_full(&sna->kgem, priv->cpu_bo, FORCE_FULL_SYNC || flags & MOVE_WRITE); + assert(pixmap->devPrivate.ptr == ((unsigned long)priv->cpu_bo->map & ~3)); assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->cpu_bo)); } if (flags & MOVE_WRITE) { @@ -2076,6 +2078,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable, if (priv->cpu_bo) { DBG(("%s: syncing CPU bo\n", __FUNCTION__)); kgem_bo_sync__cpu(&sna->kgem, priv->cpu_bo); + assert(pixmap->devPrivate.ptr == ((unsigned long)priv->cpu_bo->map & ~3)); } do { @@ -2335,6 +2338,7 @@ out: assert(IS_CPU_MAP(priv->cpu_bo->map)); kgem_bo_sync__cpu_full(&sna->kgem, priv->cpu_bo, FORCE_FULL_SYNC || flags & MOVE_WRITE); + assert(pixmap->devPrivate.ptr == ((unsigned long)priv->cpu_bo->map & ~3)); assert((flags & MOVE_WRITE) == 0 || !kgem_bo_is_busy(priv->cpu_bo)); } priv->cpu = (flags & MOVE_ASYNC_HINT) == 0; |