summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/sna_dri.c')
-rw-r--r--src/sna/sna_dri.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 5e6d3a75..a218be32 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -248,7 +248,7 @@ sna_dri_create_buffer(DrawablePtr draw,
assert(private->pixmap == pixmap);
assert(sna_pixmap(pixmap)->flush);
assert(sna_pixmap(pixmap)->gpu_bo == private->bo);
- assert(sna_pixmap(pixmap)->pinned & PIN_DRI);
+ assert(sna_pixmap(pixmap)->pinned & PIN_DRI2);
assert(kgem_bo_flink(&sna->kgem, private->bo) == buffer->name);
assert(8*private->bo->pitch >= pixmap->drawable.width * pixmap->drawable.bitsPerPixel);
assert(private->bo->pitch * pixmap->drawable.height <= kgem_bo_size(private->bo));
@@ -378,10 +378,10 @@ sna_dri_create_buffer(DrawablePtr draw,
priv = sna_pixmap(pixmap);
assert(priv->flush == false);
- assert((priv->pinned & PIN_DRI) == 0);
+ assert((priv->pinned & PIN_DRI2) == 0);
/* Don't allow this named buffer to be replaced */
- priv->pinned |= PIN_DRI;
+ priv->pinned |= PIN_DRI2;
/* We need to submit any modifications to and reads from this
* buffer before we send any reply to the Client.
@@ -424,7 +424,7 @@ static void _sna_dri_destroy_buffer(struct sna *sna, DRI2Buffer2Ptr buffer)
assert(sna_pixmap_get_buffer(pixmap) == buffer);
assert(priv->gpu_bo == private->bo);
assert(priv->gpu_bo->flush);
- assert(priv->pinned & PIN_DRI);
+ assert(priv->pinned & PIN_DRI2);
assert(priv->flush);
/* Undo the DRI markings on this pixmap */
@@ -436,7 +436,7 @@ static void _sna_dri_destroy_buffer(struct sna *sna, DRI2Buffer2Ptr buffer)
list_del(&priv->flush_list);
priv->gpu_bo->flush = false;
- priv->pinned &= ~PIN_DRI;
+ priv->pinned &= ~PIN_DRI2;
priv->flush = false;
sna_accel_watch_flush(sna, -1);
@@ -496,7 +496,7 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
assert(pixmap->drawable.height * bo->pitch <= kgem_bo_size(bo));
assert(bo->proxy == NULL);
assert(bo->flush);
- assert(priv->pinned & PIN_DRI);
+ assert(priv->pinned & PIN_DRI2);
assert((priv->pinned & PIN_PRIME) == 0);
assert(priv->flush);
@@ -1214,6 +1214,12 @@ can_flip(struct sna * sna,
return false;
}
+ if (sna_pixmap(pixmap)->pinned & ~(PIN_DRI2 | PIN_SCANOUT)) {
+ DBG(("%s -- no, pinned: front %x\n",
+ __FUNCTION__, get_private(front)->pinned));
+ return false;
+ }
+
return true;
}