summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-09-23 02:16:49 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-09-23 02:16:49 +0000
commitd5861c06f2b7c4039e410a30df828c9b43958566 (patch)
tree19a8828bb36f4080983bacd59e94c270db183759 /src
parent36d9ee1828f031951a8d6579f89a8711ff142078 (diff)
fix clipped glReadPixels bug
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_readpix.c3
1 files changed, 3 insertions, 0 deletions
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)) {