summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/r200/r200_pixel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_pixel.c b/src/mesa/drivers/dri/r200/r200_pixel.c
index e2edbfbf5c1..adc6a2aa282 100644
--- a/src/mesa/drivers/dri/r200/r200_pixel.c
+++ b/src/mesa/drivers/dri/r200/r200_pixel.c
@@ -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__);