fix addressing error in read_stencil_pixels()
This commit is contained in:
@@ -87,13 +87,13 @@ read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
|
|||||||
switch (ps->format) {
|
switch (ps->format) {
|
||||||
case PIPE_FORMAT_U_S8:
|
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);
|
memcpy(values, src, width);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PIPE_FORMAT_S8_Z24:
|
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;
|
GLint k;
|
||||||
for (k = 0; k < width; k++) {
|
for (k = 0; k < width; k++) {
|
||||||
values[k] = src[k] >> 24;
|
values[k] = src[k] >> 24;
|
||||||
|
Reference in New Issue
Block a user