diff options
author | Brian Paul <[email protected]> | 2005-09-23 02:16:49 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-23 02:16:49 +0000 |
commit | d5861c06f2b7c4039e410a30df828c9b43958566 (patch) | |
tree | 19a8828bb36f4080983bacd59e94c270db183759 /src/mesa/swrast | |
parent | 36d9ee1828f031951a8d6579f89a8711ff142078 (diff) |
fix clipped glReadPixels bug
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 3 |
1 files changed, 3 insertions, 0 deletions
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)) { |