diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-06 09:50:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-06 09:50:03 +0000 |
commit | f009386de87acccadb1803567e4c494e5e80a2a9 (patch) | |
tree | 9b68c6b0281222ca638b2138d680564c3cf714be | |
parent | 22e452ebe01c32a08599411743cf18f9ad0545a7 (diff) |
sna: If we have a CPU bo, do not assert we have shadow pixels
When transferring damage to the GPU, on SNB it is not necessarily true
that we have a shadow pixmap, we may instead have drawn onto an unmapped
CPU bo and now simply need to copy from that bo onto the GPU. Move the
assertion onto the path where it truly matters.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45672
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index b6f67720..8732ed44 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2143,7 +2143,6 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) pixmap->devKind = priv->stride; priv->mapped = false; } - assert(pixmap->devPrivate.ptr != NULL); n = sna_damage_get_boxes(priv->cpu_damage, &box); if (n) { @@ -2158,6 +2157,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) pixmap, priv->gpu_bo, 0, 0, box, n); if (!ok) { + assert(pixmap->devPrivate.ptr != NULL); if (n == 1 && !priv->pinned && (box->x2 - box->x1) >= pixmap->drawable.width && (box->y2 - box->y1) >= pixmap->drawable.height) { |