summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_readpixels.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_cb_readpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index c347a0b6888..2e7c01672a1 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -100,6 +100,15 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
}
break;
+ case PIPE_FORMAT_Z24_S8:
+ {
+ const uint *src = (uint *) stmap + srcY * ps->region->pitch + x;
+ GLint k;
+ for (k = 0; k < width; k++) {
+ values[k] = src[k] & 0xff;
+ }
+ }
+ break;
default:
assert(0);
}