From 145aa57e45d5492278ae4fe182a77b0d02ecc6f5 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 4 Mar 2009 00:36:59 +0100 Subject: [PATCH] st/dri2: Fake frontbuffer changes Front buffer rendering works as it stands but it completely wrong. But as it stands fake front buffer rendering is completely broken. So we keep it as it is. But lets atleast handle it in the get buffers code. --- src/gallium/state_trackers/dri2/dri_drawable.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/dri2/dri_drawable.c b/src/gallium/state_trackers/dri2/dri_drawable.c index 8a00c6caf1a..2f6913ec5cb 100644 --- a/src/gallium/state_trackers/dri2/dri_drawable.c +++ b/src/gallium/state_trackers/dri2/dri_drawable.c @@ -153,6 +153,10 @@ dri_get_buffers(__DRIdrawablePrivate *dPriv) index = ST_SURFACE_FRONT_LEFT; format = PIPE_FORMAT_A8R8G8B8_UNORM; break; + case __DRI_BUFFER_FAKE_FRONT_LEFT: + index = ST_SURFACE_FRONT_LEFT; + format = PIPE_FORMAT_A8R8G8B8_UNORM; + break; case __DRI_BUFFER_BACK_LEFT: index = ST_SURFACE_BACK_LEFT; format = PIPE_FORMAT_A8R8G8B8_UNORM; @@ -275,7 +279,12 @@ dri_create_buffer(__DRIscreenPrivate *sPriv, /* setup dri2 buffers information */ i = 0; drawable->attachments[i++] = __DRI_BUFFER_FRONT_LEFT; - drawable->attachments[i++] = __DRI_BUFFER_BACK_LEFT; +#if 0 + /* TODO incase of double buffer visual, delay fake creation */ + drawable->attachments[i++] = __DRI_BUFFER_FAKE_FRONT_LEFT; +#endif + if (visual->doubleBufferMode) + drawable->attachments[i++] = __DRI_BUFFER_BACK_LEFT; if (visual->depthBits) drawable->attachments[i++] = __DRI_BUFFER_DEPTH; if (visual->stencilBits) -- 2.30.2