From 90f7ae2370630c45acb9287465806e5fcac44033 Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 14 Oct 2007 11:55:45 -0600 Subject: [PATCH] accum buffer support --- src/mesa/drivers/x11/xm_api.c | 14 ++++++++++---- src/mesa/drivers/x11/xm_surface.c | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index 254d6863bab..1d3f799f368 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -442,15 +442,21 @@ create_xmesa_buffer(XMesaDrawable d, BufferType type, _mesa_add_renderbuffer(&b->mesa_buffer, BUFFER_STENCIL, rb); } + if (vis->mesa_visual.accumRedBits > 0) { + struct gl_renderbuffer *rb + = st_new_renderbuffer_fb(GL_RGBA16); + _mesa_add_renderbuffer(&b->mesa_buffer, BUFFER_ACCUM, rb); + } + /* * Other renderbuffer (depth, stencil, etc) */ _mesa_add_soft_renderbuffers(&b->mesa_buffer, - GL_FALSE, /* color */ - GL_FALSE,/*vis->mesa_visual.haveDepthBuffer,*/ - GL_FALSE, - vis->mesa_visual.haveAccumBuffer, + GL_FALSE, /* color */ + GL_FALSE, /*vis->mesa_visual.haveDepthBuffer,*/ + GL_FALSE, /* stencil */ + GL_FALSE, /* accum */ b->swAlpha, vis->mesa_visual.numAuxBuffers > 0 ); diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c index d40d9eda84f..70fa97b3395 100644 --- a/src/mesa/drivers/x11/xm_surface.c +++ b/src/mesa/drivers/x11/xm_surface.c @@ -277,10 +277,11 @@ xmesa_supported_formats(struct pipe_context *pipe, GLuint *numFormats) { static const GLuint formats[] = { PIPE_FORMAT_U_A8_R8_G8_B8, + PIPE_FORMAT_S_R16_G16_B16_A16, PIPE_FORMAT_S8_Z24 }; - *numFormats = 2; + *numFormats = sizeof(formats) / sizeof(formats[0]); return formats; } -- 2.30.2