[Mesa-dev] [PATCH 2/3] mesa: Use the _BaseFormat field to determine attachment completeness.

Ian Romanick idr at freedesktop.org
Thu Aug 26 11:50:54 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nick Bowler wrote:
> Intel sometimes uses packed depth/stencil buffers even when only a
> depth buffer or only a stencil buffer was requested.  GL specifies
> that GL_DEPTH_COMPONENT renderbuffers are *not* stencil-attachable,
> but the current check happily attaches these buffers to the stencil
> attachment point (or vice-versa for GL_STENCIL_INDEX renderbuffers
> and the depth attachment).  Performing such an attachment must yield
> an incomplete framebuffer.
> 
> Since the renderbuffer struct has the actual base format stored in it,
> use that value instead of recomputing it incorrectly.
> 
> Signed-off-by: Nick Bowler <nbowler at draconx.ca>

It may not be related (I haven't bisected yet), but at least some
programs fail with swrast now.  In particular, mandelbrot from Mesa
demos hits:

mandelbrot: main/depthstencil.c:360: _mesa_new_z24_renderbuffer_wrapper:
Assertion `dsrb->DataType == 0x84FA' failed.

> ---
>  src/mesa/main/fbobject.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index 9a84e5a..80bc518 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -485,8 +485,7 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
>        }
>     }
>     else if (att->Type == GL_RENDERBUFFER_EXT) {
> -      const GLenum baseFormat =
> -         _mesa_get_format_base_format(att->Renderbuffer->Format);
> +      const GLenum baseFormat = att->Renderbuffer->_BaseFormat;
>  
>        ASSERT(att->Renderbuffer);
>        if (!att->Renderbuffer->InternalFormat ||

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx2t4sACgkQX1gOwKyEAw+/+ACfVD/UbqSE+YbBl2soKTHzhuWz
FsgAn1cS1z7/rD/fPOqudIj1UcDE4h1U
=clNT
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list