diff options
author | Marek Olšák <[email protected]> | 2011-07-01 02:04:34 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-07-10 21:41:17 +0200 |
commit | ba15e8260ef6697fcd8c1f6ab098469db6fe78ba (patch) | |
tree | 503098f33b68fc88fd152d7efab4e91b988a4679 /src/mesa/main/framebuffer.c | |
parent | bde6a044588401ebbd14881cd5621095c221f0a5 (diff) |
mesa: implement depth/stencil renderbuffer wrapper accessors for Z32F_X24S8
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/framebuffer.c')
-rw-r--r-- | src/mesa/main/framebuffer.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 66c9bd91096..6e2ce74212e 100644 --- a/src/mesa/main/framebuffer.c +++ b/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); } |