On Thu, 22 Dec 2011 09:49:33 -0700, Brian Paul <brian.e.p...@gmail.com> wrote:
> On Wed, Dec 21, 2011 at 1:20 PM, Eric Anholt <e...@anholt.net> wrote:
> > On Sun, 18 Dec 2011 20:08:19 -0700, Brian Paul <bri...@vmware.com> 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.
> 
> And remove the _mesa_is_format_packed_depth_stencil() calls, right?
> If Att[BUFFER_DEPTH] == Att[BUFFER_STENCIL] we clearly have a combined
> depth+stencil buffer.

Yeah.

Attachment: pgpJLkmeg8XVe.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to