R1/2/3/4/5xx: fixed calculation of cliprects in CopyBuffer.
[mesa.git] / src / mesa / swrast / s_readpix.c
index 050506b0d05324e0abfd3ed1ffc02f5c6d59c1d9..9140d12ea076924dc06c8a7da661f7165d7e190a 100644 (file)
@@ -574,11 +574,9 @@ _swrast_ReadPixels( GLcontext *ctx,
       return;
    }
 
-    pixels = _mesa_validate_and_map_readpix_pbo(ctx, x, y, width, height,
-                                                format, type,
-                                                &clippedPacking, pixels);
-    if (!pixels)
-       return;
+   pixels = _mesa_map_readpix_pbo(ctx, &clippedPacking, pixels);
+   if (!pixels)
+      return;
   
    switch (format) {
       case GL_COLOR_INDEX: