diff --git a/src/mesa/state_tracker/st_cb_copyimage.c b/src/mesa/state_tracker/st_cb_copyimage.c index 2bf95a6635847..f3ab37fcbdce2 100644 --- a/src/mesa/state_tracker/st_cb_copyimage.c +++ b/src/mesa/state_tracker/st_cb_copyimage.c @@ -282,7 +282,10 @@ blit(struct pipe_context *pipe, blit.src.box = *src_box; u_box_3d(dstx, dsty, dstz, src_box->width, src_box->height, src_box->depth, &blit.dst.box); - blit.mask = PIPE_MASK_RGBA; + if (util_format_is_depth_or_stencil(dst_format)) + blit.mask = PIPE_MASK_ZS; + else + blit.mask = PIPE_MASK_RGBA; blit.filter = PIPE_TEX_FILTER_NEAREST; pipe->blit(pipe, &blit);