st/mesa: fix readpixels regression with MESA_pack_invert

Fixes an error introduced in commit 3948cd3797.

Reported-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle
2016-06-22 17:36:18 +02:00
parent 05e741c6d6
commit b3de274b05
+1 -1
View File
@@ -520,7 +520,7 @@ st_ReadPixels(struct gl_context *ctx, GLint x, GLint y,
/* memcpy data into a user buffer */
{
const uint bytesPerRow = width * util_format_get_blocksize(dst_format);
const uint destStride = _mesa_image_row_stride(pack, width, format, type);
const int destStride = _mesa_image_row_stride(pack, width, format, type);
char *dest = _mesa_image_address2d(pack, pixels,
width, height, format,
type, 0, 0);