[PATCH xserver 1/2] dri2: Always re-generate front buffer information when asked for it.

Michel Dänzer michel at daenzer.net
Fri Mar 25 10:26:55 PDT 2011


From: Michel Dänzer <daenzer at vmware.com>

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 at vmware.com>
Reviewed-by: Ville Syrjälä <ville.syrjala at nokia.com>
Reviewed-by: Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
---
 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 d8851f2..c9d8eac 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -339,6 +339,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.4.1



More information about the xorg-devel mailing list