From: Brian Date: Wed, 17 Oct 2007 20:56:55 +0000 (-0600) Subject: fix addressing error in read_stencil_pixels() X-Git-Tag: 062012170305~17580^2~390^2~3838 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e48ea925105fb74312f6e2f608b909f897a834e8;p=profile%2Fivi%2Fmesa.git fix addressing error in read_stencil_pixels() --- diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 3fcce24..8c9c47a 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;