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>
This commit is contained in:
Chris Wilson 2014-10-18 10:13:31 +01:00
parent 6b98f16241
commit bf7b5a24bb
1 changed files with 4 additions and 0 deletions

View File

@ -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);