summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Verbeet <hverbeet@gmail.com>2010-12-22 08:28:39 +0100
committerHenri Verbeet <hverbeet@gmail.com>2010-12-31 07:50:56 +0100
commit4ad4c700bf87dfcb4ef62154964302d4bf148505 (patch)
tree0a9ff0ee129c64d370c7709ed4064ac20c3fae18
parentaa196d047c2d42835f3f6f25ac304b312f33f4f9 (diff)
st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().
(cherry picked from commit 59051ad44310d7f744fcb0706326564990b554dd)
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c3
1 files changed, 3 insertions, 0 deletions
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 */