st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().

(cherry picked from commit 59051ad443)
This commit is contained in:
Henri Verbeet 2010-12-22 08:28:39 +01:00
parent b8c16ee7b1
commit 7ffeced927

View file

@ -1523,6 +1523,9 @@ st_copy_texsubimage(GLcontext *ctx,
if (texBaseFormat == GL_DEPTH_COMPONENT ||
texBaseFormat == GL_DEPTH_STENCIL) {
strb = st_renderbuffer(fb->_DepthBuffer);
if (strb->Base.Wrapped) {
strb = st_renderbuffer(strb->Base.Wrapped);
}
}
else {
/* texBaseFormat == GL_RGB, GL_RGBA, GL_ALPHA, etc */