intel-virtual-output: Mark ShmPixmap destinations as writeable

In order to prevent a subsequent BadAccess when we try to use it as a
ShmPixmap, we need to mark the segment as writeable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
References: https://bugs.freedesktop.org/show_bug.cgi?id=78293
This commit is contained in:
Chris Wilson
2014-05-05 13:06:11 +01:00
parent a93d2d4f91
commit 5279ebf564

View File

@@ -934,7 +934,7 @@ static int clone_init_xfer(struct clone *clone)
}
if (clone->dst.use_shm) {
clone->dst.shm = clone->shm;
clone->dst.shm.readOnly = True;
clone->dst.shm.readOnly = !clone->dst.use_shm_pixmap;
XShmAttach(clone->dst.dpy, &clone->dst.shm);
XSync(clone->dst.dpy, False);
}