From: Brian Paul Date: Thu, 28 Aug 2008 20:18:20 +0000 (-0600) Subject: gallium: change the conditional which tests for combined Z+stencil buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5048457372898a30478e33e66658277f5cead759;p=mesa.git gallium: change the conditional which tests for combined Z+stencil buffers The caller might be requesting 16-bit Z + 8-bit stencil be placed in a PIPE_FORMAT_S8Z24 or PIPE_FORMAT_Z24S8 buffer. --- diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c index 4012cf73e57..0f4a03fa484 100644 --- a/src/mesa/state_tracker/st_framebuffer.c +++ b/src/mesa/state_tracker/st_framebuffer.c @@ -74,7 +74,7 @@ st_create_framebuffer( const __GLcontextModes *visual, _mesa_add_renderbuffer(&stfb->Base, BUFFER_BACK_LEFT, rb); } - if (visual->depthBits == 24 && visual->stencilBits == 8) { + if (depthFormat == stencilFormat && depthFormat != PIPE_FORMAT_NONE) { /* combined depth/stencil buffer */ struct gl_renderbuffer *depthStencilRb = st_new_renderbuffer_fb(depthFormat, samples);