On Sun, 18 Dec 2011 20:08:19 -0700, Brian Paul <[email protected]> wrote: > The functions that read depth/stencil values understand all (packed) > depth/stencil buffer formats now so there's no reason to use the > wrappers. > > Also, improve the format checks in fast_copy_pixels() to catch mismatched > depth/stencil cases.
> + if (type == GL_STENCIL || type == GL_DEPTH_COMPONENT) {
> + /* can't handle packed depth+stencil here */
> + if (_mesa_is_format_packed_depth_stencil(srcRb->Format) ||
> + _mesa_is_format_packed_depth_stencil(dstRb->Format))
> + return GL_FALSE;
> + }
> + else if (type == GL_DEPTH_STENCIL) {
> + /* can't handle separate depth/stencil buffers */
> + if (!_mesa_is_format_packed_depth_stencil(srcRb->Format) ||
> + !_mesa_is_format_packed_depth_stencil(dstRb->Format))
> + return GL_FALSE;
> + }
I think the GL_DEPTH_STENCIL test here wants
srcRb != srcFb->Attachment[BUFFER_STENCIL].Renderbuffer and same for
dst. Other than that, looks good.
9, 10, 12, 13 are:
Reviewed-by: Eric Anholt <[email protected]>
pgpbbioIzFhbG.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
