st/dri: no need to request fake front buffer, only handle it being returned
authorBen Skeggs <bskeggs@redhat.com>
Mon, 5 Oct 2009 05:32:55 +0000 (15:32 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 5 Oct 2009 05:32:55 +0000 (15:32 +1000)
The previous behaviour was incorrect, and resulted in EXT_tfp being broken
for DDX drivers that implement the correct behaviour (intel/radeon/nouveau).

In the cases where a fake front buffer is required, the X server will
return one when requesting __DRI_BUFFER_FRONT_LEFT.

The Xorg state tracker (aka modesetting_drv) is likely broken now until
it's modified to match the other drivers.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
src/gallium/state_trackers/dri/dri_drawable.c

index 5cec9e329d9d4250f7f59acc585e729e396f5999..6aafb384ef53b3beb98bab4309d51164285b8896 100644 (file)
@@ -179,7 +179,6 @@ 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;
@@ -360,8 +359,6 @@ 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)