From: Brian Paul Date: Fri, 9 Oct 2009 19:20:28 +0000 (-0600) Subject: st/mesa: create aux buffers according to visual X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6164f1fe790def9f3ca4f1f555ef59bbaa82db90;p=mesa.git st/mesa: create aux buffers according to visual Fixes bug 24426 for gallium. --- diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c index 5c0d335d62d..a5d1ae3b034 100644 --- a/src/mesa/state_tracker/st_framebuffer.c +++ b/src/mesa/state_tracker/st_framebuffer.c @@ -52,6 +52,7 @@ st_create_framebuffer( const __GLcontextModes *visual, struct st_framebuffer *stfb = ST_CALLOC_STRUCT(st_framebuffer); if (stfb) { int samples = st_get_msaa(); + int i; if (visual->sampleBuffers) samples = visual->samples; @@ -119,6 +120,12 @@ st_create_framebuffer( const __GLcontextModes *visual, _mesa_add_renderbuffer(&stfb->Base, BUFFER_ACCUM, accumRb); } + for (i = 0; i < visual->numAuxBuffers; i++) { + struct gl_renderbuffer *aux + = st_new_renderbuffer_fb(colorFormat, 0, FALSE); + _mesa_add_renderbuffer(&stfb->Base, BUFFER_AUX0 + i, aux); + } + stfb->Base.Initialized = GL_TRUE; stfb->InitWidth = width; stfb->InitHeight = height;