From bf7b5a24bbfc8a3553be6baa457ec92559dd3d65 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 18 Oct 2014 10:13:31 +0100 Subject: [PATCH] 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 --- src/sna/sna_dri2.c | 4 ++++ 1 file changed, 4 insertions(+) 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);