diff options
author | marha <marha@users.sourceforge.net> | 2011-03-30 06:43:04 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-30 06:43:04 +0000 |
commit | 2039567395da75a3ae318fb82738cdcf2caa05a1 (patch) | |
tree | 23caaf9e0f6867d85f5cffc284d008c591ae99cb /mesalib/src/mesa/state_tracker/st_cb_readpixels.c | |
parent | 24abc56b37a3ec32a03b7eafccd96607ae13ea89 (diff) | |
download | vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.gz vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.bz2 vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.zip |
mesa git update 30 Mar 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_readpixels.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_readpixels.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |