From: Henri Verbeet Date: Wed, 22 Dec 2010 07:28:39 +0000 (+0100) Subject: st/mesa: Handle wrapped depth buffers in st_copy_texsubimage(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59051ad44310d7f744fcb0706326564990b554dd;p=mesa.git st/mesa: Handle wrapped depth buffers in st_copy_texsubimage(). --- diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 866426a7549..14d33f7b490 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1528,6 +1528,9 @@ st_copy_texsubimage(struct gl_context *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 */