From: Marek Olšák Date: Wed, 13 Feb 2013 21:23:37 +0000 (+0100) Subject: st/mesa: fix blit-based GetTexImage for depth/stencil formats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91acf6225a5e3f08388e6bff8f2c4213769120fe;p=mesa.git st/mesa: fix blit-based GetTexImage for depth/stencil formats BTW, we have 0 tests for glGetTexImage(format=GL_DEPTH*). Reviewed-by: Brian Paul --- diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 5b3d2abcdc2..b0d4ea596a0 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -777,7 +777,7 @@ st_GetTexImage(struct gl_context * ctx, blit.src.box.width = blit.dst.box.width = width; blit.src.box.height = blit.dst.box.height = height; blit.src.box.depth = blit.dst.box.depth = depth; - blit.mask = PIPE_MASK_RGBA; + blit.mask = get_blit_mask(texImage->_BaseFormat, format); blit.filter = PIPE_TEX_FILTER_NEAREST; blit.scissor_enable = FALSE;