From d5861c06f2b7c4039e410a30df828c9b43958566 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 23 Sep 2005 02:16:49 +0000 Subject: fix clipped glReadPixels bug --- src/mesa/swrast/s_readpix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 9e80908ba1..6171b3440e 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)) { -- cgit v1.2.3