From cb51f0267853dad419d169587aecbecf1800e8c3 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 11 Jan 2010 21:32:13 +0100 Subject: [PATCH] Revert "st/dri: no need to request fake front buffer, only handle it being returned" This reverts commit 1336989ec60fff7bd590fefd28945a0e5dc536e3. The commit breaks frontbuffer rendering and the possibility to do on-demand frontbuffer requests on all Xservers prior to 1.7. The commit should be conditioned on a dri2 version check. I've submitted a patch to Xserver to bump dri2 minor, and it's acked by Ian. To be able to check the version from within the state tracker, we will probably need another dri2 extension function that returns the server version. The protocol has support for it. Signed-off-by: Thomas Hellstrom --- src/gallium/state_trackers/dri/dri_drawable.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index 5625ff53cfd..c4dfb0c41f8 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -180,6 +180,7 @@ dri_get_buffers(__DRIdrawablePrivate * dPriv) switch (buffers[i].attachment) { case __DRI_BUFFER_FRONT_LEFT: + continue; case __DRI_BUFFER_FAKE_FRONT_LEFT: index = ST_SURFACE_FRONT_LEFT; format = drawable->color_format; @@ -367,6 +368,8 @@ dri_create_buffer(__DRIscreenPrivate * sPriv, if (visual->doubleBufferMode) drawable->attachments[i++] = __DRI_BUFFER_BACK_LEFT; + else + drawable->attachments[i++] = __DRI_BUFFER_FAKE_FRONT_LEFT; if (visual->depthBits && visual->stencilBits) drawable->attachments[i++] = __DRI_BUFFER_DEPTH_STENCIL; else if (visual->depthBits) -- 2.30.2