aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-07-11 08:47:29 +0200
committermarha <marha@users.sourceforge.net>2011-07-11 08:47:29 +0200
commit0b43e0b4ddbd9fdac70658164f3dbf653067a4de (patch)
tree96f2c71cec2c8c7e34b1f2e0c1518bea14adfcf2 /mesalib/src/mesa/main/framebuffer.c
parent47a6ae678489d7082b5d7da35d1a92b4233fb5eb (diff)
downloadvcxsrv-0b43e0b4ddbd9fdac70658164f3dbf653067a4de.tar.gz
vcxsrv-0b43e0b4ddbd9fdac70658164f3dbf653067a4de.tar.bz2
vcxsrv-0b43e0b4ddbd9fdac70658164f3dbf653067a4de.zip
mesa update 11 july 2011
Diffstat (limited to 'mesalib/src/mesa/main/framebuffer.c')
-rw-r--r--mesalib/src/mesa/main/framebuffer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c
index 66c9bd910..6e2ce7421 100644
--- a/mesalib/src/mesa/main/framebuffer.c
+++ b/mesalib/src/mesa/main/framebuffer.c
@@ -631,8 +631,14 @@ _mesa_update_depth_buffer(struct gl_context *ctx,
|| fb->_DepthBuffer->Wrapped != depthRb
|| _mesa_get_format_base_format(fb->_DepthBuffer->Format) != GL_DEPTH_COMPONENT) {
/* need to update wrapper */
- struct gl_renderbuffer *wrapper
- = _mesa_new_z24_renderbuffer_wrapper(ctx, depthRb);
+ struct gl_renderbuffer *wrapper;
+
+ if (depthRb->Format == MESA_FORMAT_Z32_FLOAT_X24S8) {
+ wrapper = _mesa_new_z32f_renderbuffer_wrapper(ctx, depthRb);
+ }
+ else {
+ wrapper = _mesa_new_z24_renderbuffer_wrapper(ctx, depthRb);
+ }
_mesa_reference_renderbuffer(&fb->_DepthBuffer, wrapper);
ASSERT(fb->_DepthBuffer->Wrapped == depthRb);
}