summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-17 14:56:55 -0600
committerBrian <[email protected]>2007-10-17 14:56:55 -0600
commite48ea925105fb74312f6e2f608b909f897a834e8 (patch)
tree8b9cd8b9b41dc7264051a7067b738c93c2219a6e /src/mesa
parent906768316d9521a32d9a7eebc9edaf76c06a98a7 (diff)
fix addressing error in read_stencil_pixels()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 3fcce2463cd..8c9c47a5353 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -87,13 +87,13 @@ read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
switch (ps->format) {
case PIPE_FORMAT_U_S8:
{
- const ubyte *src = stmap + y * ps->region->pitch + x;
+ const ubyte *src = stmap + srcY * ps->region->pitch + x;
memcpy(values, src, width);
}
break;
case PIPE_FORMAT_S8_Z24:
{
- const uint *src = (const uint *) stmap + y * ps->region->pitch + x;
+ const uint *src = (uint *) stmap + srcY * ps->region->pitch + x;
GLint k;
for (k = 0; k < width; k++) {
values[k] = src[k] >> 24;