summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-03-04 00:36:59 +0100
committerJakob Bornecrantz <[email protected]>2009-03-04 00:39:59 +0100
commit145aa57e45d5492278ae4fe182a77b0d02ecc6f5 (patch)
tree534a01a61a38f3d14b87d0d2a7c8435c0addfd13 /src
parent28c325f8d3925d703a0cc5a3d3d3fa57b7f11fe4 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/dri2/dri_drawable.c11
1 files changed, 10 insertions, 1 deletions
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)