From: Roland Scheidegger Date: Mon, 30 Jan 2006 23:49:31 +0000 (+0000) Subject: fix broken assertions so dri drivers compile with -DDEBUG (replace GL_STENCIL_INDEX8... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=663138a9510be5d2f3ee2bda41e3a8c86ab688b5;p=mesa.git fix broken assertions so dri drivers compile with -DDEBUG (replace GL_STENCIL_INDEX8 with GL_STENCIL_INDEX8_EXT). Fix potential problem with drivers which use 32bit z buffers. --- diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c index cb26bb48970..29ba1ea8a30 100644 --- a/src/mesa/drivers/dri/common/drirenderbuffer.c +++ b/src/mesa/drivers/dri/common/drirenderbuffer.c @@ -92,9 +92,15 @@ driNewRenderbuffer(GLenum format, GLvoid *addr, /* we always Get/Put 32-bit Z values */ drb->Base.DataType = GL_UNSIGNED_INT; } + else if (format == GL_DEPTH_COMPONENT32) { + /* Depth */ + drb->Base._BaseFormat = GL_DEPTH_COMPONENT; + /* we always Get/Put 32-bit Z values */ + drb->Base.DataType = GL_UNSIGNED_INT; + } else { /* Stencil */ - ASSERT(format == GL_STENCIL_INDEX8); + ASSERT(format == GL_STENCIL_INDEX8_EXT); drb->Base._BaseFormat = GL_STENCIL_INDEX; drb->Base.DataType = GL_UNSIGNED_BYTE; } diff --git a/src/mesa/drivers/dri/sis/sis_dd.c b/src/mesa/drivers/dri/sis/sis_dd.c index 4e73f562b02..39c00a18af6 100644 --- a/src/mesa/drivers/dri/sis/sis_dd.c +++ b/src/mesa/drivers/dri/sis/sis_dd.c @@ -160,7 +160,7 @@ sisInitRenderbuffer(struct gl_renderbuffer *rb, GLenum format) } else { /* Stencil */ - ASSERT(format == GL_STENCIL_INDEX8); + ASSERT(format == GL_STENCIL_INDEX8_EXT); rb->_BaseFormat = GL_STENCIL_INDEX; rb->DataType = GL_UNSIGNED_BYTE; } diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index 62498fb8745..183f3d3479f 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -177,7 +177,7 @@ viaInitRenderbuffer(struct gl_renderbuffer *rb, GLenum format) } else { /* Stencil */ - ASSERT(format == GL_STENCIL_INDEX8); + ASSERT(format == GL_STENCIL_INDEX8_EXT); rb->_BaseFormat = GL_STENCIL_INDEX; rb->DataType = GL_UNSIGNED_BYTE; }