From: Luca B. <lu...@lu...> - 2010-03-23 16:39:45
|
The problem seems to be in st_manager.c: if (visual->depth_stencil_format != PIPE_FORMAT_NONE) { mode->haveDepthBuffer = GL_TRUE; mode->haveStencilBuffer = GL_TRUE; mode->depthBits = util_format_get_component_bits(visual->depth_stencil_format, UTIL_FORMAT_COLORSPACE_ZS, 0); mode->stencilBits = util_format_get_component_bits(visual->depth_stencil_format, UTIL_FORMAT_COLORSPACE_ZS, 1); } This sets haveStencilBuffer even for depth-only buffers. How about fixing this to set haveDepthBuffer and haveStencilBuffer only if bits > 0, and later removing haveStencilBuffer, haveDepthBuffer and haveAccumBuffer in favor of just testing the *bits counterparts? BTW, what if we have a floating-point depth buffer, or, say, a shared exponent floating-point color buffer? How do we represent that with the visual structure? Shouldn't we be using the actual formats instead of this *bits stuff, maybe by having Mesa look at its internal structures instead of a GLXVisual-like struct? |