From 59051ad44310d7f744fcb0706326564990b554dd Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 22 Dec 2010 08:28:39 +0100 Subject: st/mesa: Handle wrapped depth buffers in st_copy_texsubimage(). --- src/mesa/state_tracker/st_cb_texture.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 */ -- cgit v1.2.3