From 6164f1fe790def9f3ca4f1f555ef59bbaa82db90 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 9 Oct 2009 13:20:28 -0600 Subject: [PATCH] st/mesa: create aux buffers according to visual Fixes bug 24426 for gallium. --- src/mesa/state_tracker/st_framebuffer.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.30.2