From: Brian Paul Date: Fri, 23 Sep 2005 02:16:49 +0000 (+0000) Subject: fix clipped glReadPixels bug X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5861c06f2b7c4039e410a30df828c9b43958566;p=mesa.git fix clipped glReadPixels bug --- diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 9e80908ba1f..6171b3440e6 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -507,6 +507,9 @@ _swrast_ReadPixels( GLcontext *ctx, /* Do all needed clipping here, so that we can forget about it later */ clippedPacking = *packing; + if (clippedPacking.RowLength == 0) { + clippedPacking.RowLength = width; + } if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking.SkipPixels, &clippedPacking.SkipRows)) {