summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-10-18 10:13:31 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-10-18 10:13:31 +0100
commitbf7b5a24bbfc8a3553be6baa457ec92559dd3d65 (patch)
tree7b2ee53be3ab1785c95ac7ef1229e483ad98961a
parent6b98f16241c2a4788f3b5fe4c0d956a849d2ac05 (diff)
sna/dri2: Exchange pitches as well
When swapping over the names, we also need to swap the pitches exposed through the protocol as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_dri2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 784caee8..63593771 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1872,6 +1872,10 @@ sna_dri2_xchg(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back)
front->name = back->name;
back->name = tmp;
+ tmp = front->pitch;
+ front->pitch = back->pitch;
+ back->pitch = tmp;
+
assert(front_bo->refcnt);
assert(back_bo->refcnt);