From 2039567395da75a3ae318fb82738cdcf2caa05a1 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 30 Mar 2011 06:43:04 +0000 Subject: mesa git update 30 Mar 2011 --- mesalib/src/mesa/state_tracker/st_cb_readpixels.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mesalib/src/mesa/state_tracker/st_cb_readpixels.c') diff --git a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c index f8da2a4d1..03f58bf0f 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c +++ b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c @@ -331,7 +331,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h struct st_context *st = st_context(ctx); struct pipe_context *pipe = st->pipe; GLfloat (*temp)[4]; - const GLbitfield transferOps = ctx->_ImageTransferState; + GLbitfield transferOps = ctx->_ImageTransferState; GLsizei i, j; GLint yStep, dfStride; GLfloat *df; @@ -391,7 +391,10 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei h return; } - if (format == GL_RGBA && type == GL_FLOAT) { + if(ctx->Color._ClampReadColor) + transferOps |= IMAGE_CLAMP_BIT; + + if (format == GL_RGBA && type == GL_FLOAT && !transferOps) { /* write tile(row) directly into user's buffer */ df = (GLfloat *) _mesa_image_address2d(&clippedPacking, dest, width, height, format, type, 0, 0); -- cgit v1.2.3