diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-23 18:29:26 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-24 12:01:17 +0100 |
commit | fffb1f52b61fd4983e4a1ff29c4673481ea63f17 (patch) | |
tree | 2a56fcb1872c94b51267ece5dee1b1ddf6a2c69b /src/sna | |
parent | 364c91697805e3d6504c14128ec21d95026a2551 (diff) | |
download | xorg-driver-xf86-video-intel-fffb1f52b61fd4983e4a1ff29c4673481ea63f17.tar.gz |
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>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_dri2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 4acb04c2..0cbc7599 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -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); |