xf86-video-intel: src/sna/sna_dri2.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 24 11:03:03 UTC 2019
src/sna/sna_dri2.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit fffb1f52b61fd4983e4a1ff29c4673481ea63f17
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jul 23 18:29:26 2019 +0100
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 at chris-wilson.co.uk>
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);
More information about the xorg-commit
mailing list