From 5048457372898a30478e33e66658277f5cead759 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 28 Aug 2008 14:18:20 -0600 Subject: 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. --- src/mesa/state_tracker/st_framebuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') 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); -- cgit v1.2.3