summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-04-06 04:09:03 +0000
committerBrian Paul <[email protected]>2006-04-06 04:09:03 +0000
commit5722338ea5376cea562f27cad3bce29276930f37 (patch)
treeda3531e3406dd393d8c38391fb21ffb28bf3d07e
parent32cd166971c0d78a51c3f87ded66ec904ef05316 (diff)
do additional checking for setting up depth/stencil wrappers
-rw-r--r--src/mesa/main/framebuffer.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 7ce84131e63..93950d3cd1c 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.1
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -481,7 +481,9 @@ _mesa_update_depth_buffer(GLcontext *ctx,
if (depthRb && depthRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT) {
/* The attached depth buffer is a GL_DEPTH_STENCIL renderbuffer */
- if (!fb->_DepthBuffer || fb->_DepthBuffer->Wrapped != depthRb) {
+ if (!fb->_DepthBuffer
+ || fb->_DepthBuffer->Wrapped != depthRb
+ || fb->_DepthBuffer->_BaseFormat != GL_DEPTH_COMPONENT) {
/* need to update wrapper */
struct gl_renderbuffer *wrapper
= _mesa_new_z24_renderbuffer_wrapper(ctx, depthRb);
@@ -520,7 +522,9 @@ _mesa_update_stencil_buffer(GLcontext *ctx,
if (stencilRb && stencilRb->_ActualFormat == GL_DEPTH24_STENCIL8_EXT) {
/* The attached stencil buffer is a GL_DEPTH_STENCIL renderbuffer */
- if (!fb->_StencilBuffer || fb->_StencilBuffer->Wrapped != stencilRb) {
+ if (!fb->_StencilBuffer
+ || fb->_StencilBuffer->Wrapped != stencilRb
+ || fb->_StencilBuffer->_BaseFormat != GL_STENCIL_INDEX) {
/* need to update wrapper */
struct gl_renderbuffer *wrapper
= _mesa_new_s8_renderbuffer_wrapper(ctx, stencilRb);