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 e2edbfb..adc6a2a 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__);