mirror of
https://github.com/X11Libre/xf86-video-intel.git
synced 2026-03-24 01:24:12 +00:00
sna/dri2: Don't decouple front buffer tracking for invalid SwapBuffer calls
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
@@ -2658,6 +2658,14 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
|
||||
assert(get_private(front)->bo->refcnt);
|
||||
assert(get_private(back)->bo->refcnt);
|
||||
|
||||
if (get_private(front)->pixmap != get_drawable_pixmap(draw))
|
||||
goto skip;
|
||||
|
||||
if (get_private(back)->stale)
|
||||
goto skip;
|
||||
|
||||
assert(sna_pixmap_from_drawable(draw)->flush);
|
||||
|
||||
if (draw->type != DRAWABLE_PIXMAP) {
|
||||
struct dri2_window *priv = dri2_window((WindowPtr)draw);
|
||||
if (priv->front) {
|
||||
@@ -2668,14 +2676,6 @@ sna_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
|
||||
}
|
||||
}
|
||||
|
||||
if (get_private(front)->pixmap != get_drawable_pixmap(draw))
|
||||
goto skip;
|
||||
|
||||
if (get_private(back)->stale)
|
||||
goto skip;
|
||||
|
||||
assert(sna_pixmap_from_drawable(draw)->flush);
|
||||
|
||||
/* Drawable not displayed... just complete the swap */
|
||||
if ((sna->flags & SNA_NO_WAIT) == 0)
|
||||
crtc = sna_dri2_get_crtc(draw);
|
||||
|
||||
Reference in New Issue
Block a user