diff options
author | Michel Dänzer <daenzer@vmware.com> | 2011-12-18 18:29:39 +0200 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-12-19 22:31:01 -0800 |
commit | 6f916ffec7767eeab62132eb6575043969104c81 (patch) | |
tree | 11ad4f6d70f87079dbe34cb74d40bcc758171e5d | |
parent | 603fcb3abf155e91fd3250f4a7aa16f289506e8e (diff) |
dri2: Always re-generate front buffer information when asked for it.
Otherwise we might keep stale cached information, e.g. after the driver
performed page flipping.
This is part of the fix for
https://bugs.freedesktop.org/show_bug.cgi?id=35452 .
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/xfree86/dri2/dri2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index d2035a4e6..eb84aa5f5 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -377,6 +377,7 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, int old_buf = find_attachment(pPriv, attachment); if ((old_buf < 0) + || attachment == DRI2BufferFrontLeft || !dimensions_match || (pPriv->buffers[old_buf]->format != format)) { *buffer = (*ds->CreateBuffer)(pDraw, attachment, format); |