[Mesa-dev] [PATCH 4/5] st/mesa: implement depth-only blit for BlitFramebuffer

Marek Olšák maraeo at gmail.com
Sat Aug 14 08:47:34 PDT 2010


---
 src/mesa/state_tracker/st_cb_blit.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index b3c7544..5367484 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -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) {
-- 
1.7.0.4



More information about the mesa-dev mailing list