From: Michel Dänzer Date: Wed, 7 Oct 2009 14:36:39 +0000 (+0200) Subject: st/dri: Add missing front buffer case in dri_get_buffers(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de81b2cf0a465e2c6c43c7f9f864129728b3a080;p=mesa.git st/dri: Add missing front buffer case in dri_get_buffers(). This seems to help for compiz at least with some drivers. Also add an assert(0) to catch unhandled cases in the future. --- diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index 3f8dc8df75e..c67cc8dacb6 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -213,6 +213,7 @@ dri_get_buffers(__DRIdrawablePrivate * dPriv) dri_drawable->h, buffers[i].pitch); switch (buffers[i].attachment) { + case __DRI_BUFFER_FRONT_LEFT: case __DRI_BUFFER_FAKE_FRONT_LEFT: case __DRI_BUFFER_BACK_LEFT: drawable->color_format = surface->format; @@ -222,6 +223,9 @@ dri_get_buffers(__DRIdrawablePrivate * dPriv) case __DRI_BUFFER_STENCIL: drawable->depth_stencil_format = surface->format; break; + case __DRI_BUFFER_ACCUM: + default: + assert(0); } st_set_framebuffer_surface(drawable->stfb, index, surface);