[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesa3d-dev
Subject:    Re: [Mesa3d-dev] Assertion failure in _swrast_clear_depth_buffer
From:       Brian Paul <brianp () vmware ! com>
Date:       2009-02-26 21:47:27
Message-ID: 49A70DEF.4080103 () vmware ! com
[Download RAW message or body]

Ian Romanick wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm hitting an assertion failure in _swrast_clear_depth_buffer:
> 
>    assert(rb->_BaseFormat == GL_DEPTH_COMPONENT);
> 
> I debugged it, and rb->_BaseFormat is GL_DEPTH_STENCIL.  Before I dig
> too deep, is this the right place for GL_DEPTH_COMPONENT buffers to end
> up?  Is the assertion just bad?  The code doesn't look like it would
> handle interleaved depth / stencil buffers.  Halp plz?

The assertion is correct.

Combined depth/stencil buffers get "wrapped" by two gl_renderbuffer 
adaptors, one that makes the buffer look like a depth buffer, another 
one that makes the buffer look like a stencil buffer.

See comments in depthstencil.c

These adaptors/wrappers are created during framebuffer validation.  See 
_mesa_update_depth_buffer() and _mesa_update_stencil_buffer().

For your failed assertion, it looks like the renderbuffer wrappers 
aren't being created, or ctx->DrawBuffer->_DepthBuffer is pointing to 
the wrong type of renderbuffer.

-Brian


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic