st/mesa: implement depth-only blit for BlitFramebuffer
authorMarek Olšák <maraeo@gmail.com>
Sat, 14 Aug 2010 15:47:34 +0000 (08:47 -0700)
committerBrian Paul <brianp@vmware.com>
Mon, 23 Aug 2010 01:40:26 +0000 (19:40 -0600)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_blit.c

index b3c754477a447c5196e5032c58903db943500ccc..536748402f40075477a1d560fd490d43ed1d3f8e 100644 (file)
@@ -188,8 +188,13 @@ st_BlitFramebuffer(GLcontext *ctx,
          /* blitting depth and stencil separately */
 
          if (mask & GL_DEPTH_BUFFER_BIT) {
-            /* blit Z only */
-            _mesa_problem(ctx, "st_BlitFramebuffer(DEPTH) not completed");
+            util_blit_pixels(st->blit, srcDepthRb->texture,
+                             u_subresource(srcDepthRb->surface->face,
+                                           srcDepthRb->surface->level),
+                             srcX0, srcY0, srcX1, srcY1,
+                             srcDepthRb->surface->zslice,
+                             dstDepthSurf, dstX0, dstY0, dstX1, dstY1,
+                             0.0, pFilter);
          }
 
          if (mask & GL_STENCIL_BUFFER_BIT) {