xorg-r200-uninitialized-variable-used.patch from Redhat xorg
authorDave Airlie <airliedfreedesktop.org>
Sat, 31 Jul 2004 08:14:50 +0000 (08:14 +0000)
committerDave Airlie <airliedfreedesktop.org>
Sat, 31 Jul 2004 08:14:50 +0000 (08:14 +0000)
src/mesa/drivers/dri/r200/r200_pixel.c

index e2edbfbf5c1123a433808c00d7a5d87f536cdac5..adc6a2aa282b7c3d4f5374cb2e262e07bf54fa09 100644 (file)
@@ -152,9 +152,10 @@ r200TryReadPixels( GLcontext *ctx,
                  GLvoid *pixels )
 {
    r200ContextPtr rmesa = R200_CONTEXT(ctx);
-   GLint size;
    GLint pitch = pack->RowLength ? pack->RowLength : width;
    GLint blit_format;
+   GLuint cpp = rmesa->r200Screen->cpp;
+   GLint size = width * height * cpp;
 
    if (R200_DEBUG & DEBUG_PIXEL)
       fprintf(stderr, "%s\n", __FUNCTION__);