summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-11-20 15:08:56 +0100
committerMarek Olšák <[email protected]>2011-11-22 20:56:50 +0100
commite99df05cce8a5ecf69fdb634f76898a279456ea4 (patch)
tree59b492803c5531f20975bec7ff5ca66939a9212b
parent151867b422d07b9e5845e95c2ebc30567809edc5 (diff)
st/mesa: quick fix of CopyPixels with GL_DEPTH_STENCIL
This fixes: - depthstencil-default_fb-copypixels - fbo-depthstencil-GL_DEPTH24_STENCIL8-copypixels Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 95805fd3c05..912241b35cf 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1441,6 +1441,13 @@ st_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy,
st_validate_state(st);
+ if (type == GL_DEPTH_STENCIL) {
+ /* XXX make this more efficient */
+ st_CopyPixels(ctx, srcx, srcy, width, height, dstx, dsty, GL_STENCIL);
+ st_CopyPixels(ctx, srcx, srcy, width, height, dstx, dsty, GL_DEPTH);
+ return;
+ }
+
if (type == GL_STENCIL) {
/* can't use texturing to do stencil */
copy_stencil_pixels(ctx, srcx, srcy, width, height, dstx, dsty);