summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-19 00:36:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-19 00:40:04 +0100
commit8cdfb8c24c8b49c88451714d80293c66d63e8c01 (patch)
treeb2d43fb7cb278f184434c165326e5e8dbca4865b
parent17f3a83fdc8c0ef5c12fb4be34d86021c0c865e5 (diff)
sna: Fix up the shadow pointer on the source when copying
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index da509424..13f91c28 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4023,7 +4023,18 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
}
assert_pixmap_damage(dst_pixmap);
} else {
- assert(!src_priv->gpu_bo);
+ if (src_priv) {
+ /* Fixup the shadow pointer as neccessary */
+ assert(!src_priv->gpu_bo);
+ assert(!src_priv->mapped);
+ if (src_pixmap->devPrivate.ptr == NULL) {
+ if (!src_priv->ptr) /* uninitialised!*/
+ goto out;
+ assert(src_priv->stride);
+ src_pixmap->devPrivate.ptr = src_priv->ptr;
+ src_pixmap->devKind = src_priv->stride;
+ }
+ }
if (!dst_priv->pinned && replaces) {
stride = src_pixmap->devKind;