summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-09 13:20:28 -0600
committerBrian Paul <[email protected]>2009-10-09 13:22:15 -0600
commit6164f1fe790def9f3ca4f1f555ef59bbaa82db90 (patch)
treeaf9401a8fcd959c8e840d81c5174b09e25b42f18 /src
parentce64e063a8b32d842a3b5dfe62178e9e4cd89f9c (diff)
st/mesa: create aux buffers according to visual
Fixes bug 24426 for gallium.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c7
1 files changed, 7 insertions, 0 deletions
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;