st/mesa: fix blit-based GetTexImage for depth/stencil formats
authorMarek Olšák <maraeo@gmail.com>
Wed, 13 Feb 2013 21:23:37 +0000 (22:23 +0100)
committerMarek Olšák <maraeo@gmail.com>
Mon, 18 Feb 2013 16:57:41 +0000 (17:57 +0100)
BTW, we have 0 tests for glGetTexImage(format=GL_DEPTH*).

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_texture.c

index 5b3d2abcdc24bd9792d5e1f84213254a2c862435..b0d4ea596a0fbc9686c5fde517a083a3c90d8204 100644 (file)
@@ -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;