st/mesa: Handle wrapped depth buffers in st_copy_texsubimage().
authorHenri Verbeet <hverbeet@gmail.com>
Wed, 22 Dec 2010 07:28:39 +0000 (08:28 +0100)
committerHenri Verbeet <hverbeet@gmail.com>
Fri, 31 Dec 2010 06:49:59 +0000 (07:49 +0100)
src/mesa/state_tracker/st_cb_texture.c

index 866426a75494e76e678edb53c37c218d2c78524f..14d33f7b490c35c501280dacc03b26239a8a4b4f 100644 (file)
@@ -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 */