sna/dri2: Skip asserting distinct front/back for stale swaps
If the backbuffer is stale (i.e. the client didn't call DRI2GetBuffers before swapping) the front/back bo may not be distinct. Move the assertion for a valid swap after the handling of a stale swap so that the assertions are more robust for a client error. References: https://bugs.freedesktop.org/show_bug.cgi?id=111197 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
364c916978
commit
fffb1f52b6
|
|
@ -3314,10 +3314,6 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
|
|||
assert(get_private(front)->refcnt);
|
||||
assert(get_private(back)->refcnt);
|
||||
|
||||
assert(get_private(back)->bo != get_private(front)->bo);
|
||||
assert(get_private(front)->bo->refcnt);
|
||||
assert(get_private(back)->bo->refcnt);
|
||||
|
||||
if (get_private(front)->pixmap != get_drawable_pixmap(draw)) {
|
||||
DBG(("%s: decoupled DRI2 front pixmap=%ld, actual pixmap=%ld\n",
|
||||
__FUNCTION__,
|
||||
|
|
@ -3331,6 +3327,10 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
|
|||
goto skip;
|
||||
}
|
||||
|
||||
assert(get_private(back)->bo != get_private(front)->bo);
|
||||
assert(get_private(front)->bo->refcnt);
|
||||
assert(get_private(back)->bo->refcnt);
|
||||
|
||||
assert(get_private(front)->bo->active_scanout);
|
||||
assert(!get_private(back)->bo->active_scanout);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue