[Mesa-dev] [PATCH 2/7] st/mesa: fix blit-based GetTexImage for depth/stencil formats

Marek Olšák maraeo at gmail.com
Thu Feb 14 06:53:22 PST 2013


BTW, we have 0 tests for glGetTexImage(format=GL_DEPTH*).
---
 src/mesa/state_tracker/st_cb_texture.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 5b3d2ab..b0d4ea5 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;
 
-- 
1.7.10.4



More information about the mesa-dev mailing list