From: Michel Dänzer <[email protected]>

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 <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Reviewed-by: Mario Kleiner <[email protected]>
---
 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 d2035a4..eb84aa5 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);
-- 
1.7.3.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to