st/mesa: fix readpixels regression with MESA_pack_invert
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 22 Jun 2016 15:36:18 +0000 (17:36 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 24 Jun 2016 10:36:02 +0000 (12:36 +0200)
Fixes an error introduced in commit 3948cd37973696dc319170877382676809659465.

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>
src/mesa/state_tracker/st_cb_readpixels.c

index 77c6332329594e33b07b0a8ab02e241d12fd6df6..99d9cd59b0fd01fde575692a4aa3f4ec7f5476d7 100644 (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);