summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authorNick Bowler <[email protected]>2010-08-26 07:26:21 -0700
committerBrian Paul <[email protected]>2010-08-26 08:42:24 -0600
commite71a9042cb5e046072d2ea8fbd22a01de625bf8a (patch)
tree1720fb74c8d66035439b77fcd335bd9698a63ceb /src/mesa/main/framebuffer.c
parentbda941e1b895547d680b68eaf28ae2db11e6149f (diff)
mesa: Identify packed depth/stencil buffers using the Format field.
Intel sometimes uses packed depth/stencil buffers even when only a depth buffer or only a stencil buffer was requested. Common code currently uses the _BaseFormat field to determine whether a depth/stencil wrapper is necessary. But unless the user explicitly requested a packed depth/stencil buffer, the _BaseFormat field does not encode this information, and the required wrappers are not created. The problem was introduced by commit 45e76d2665b38b ("mesa: remove a bunch of gl_renderbuffer fields"), which killed off the _ActualFormat field upon which the decision to create a wrapper used to be made. This patch changes the logic to use the Format field instead, which is more like the old code. Fixes fdo bug 27590. Signed-off-by: Nick Bowler <[email protected]> Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r--src/mesa/main/framebuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index e0aac26f62b..3099fc3e7f2 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -611,7 +611,7 @@ _mesa_update_depth_buffer(GLcontext *ctx,
depthRb = fb->Attachment[attIndex].Renderbuffer;
- if (depthRb && depthRb->_BaseFormat == GL_DEPTH_STENCIL) {
+ if (depthRb && _mesa_format_is_packed_depth_stencil(depthRb->Format)) {
/* The attached depth buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_DepthBuffer
|| fb->_DepthBuffer->Wrapped != depthRb
@@ -652,7 +652,7 @@ _mesa_update_stencil_buffer(GLcontext *ctx,
stencilRb = fb->Attachment[attIndex].Renderbuffer;
- if (stencilRb && stencilRb->_BaseFormat == GL_DEPTH_STENCIL) {
+ if (stencilRb && _mesa_format_is_packed_depth_stencil(stencilRb->Format)) {
/* The attached stencil buffer is a GL_DEPTH_STENCIL renderbuffer */
if (!fb->_StencilBuffer
|| fb->_StencilBuffer->Wrapped != stencilRb