diff options
author | Alan Hourihane <[email protected]> | 2008-11-20 13:44:13 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2008-11-20 13:44:13 +0000 |
commit | ef2bf418b45c7966e9fe78359058b8d44f570be1 (patch) | |
tree | c0bc3be44bae336ca4c9133ffb2529c8d99bbc0f /src/mesa/main/texstore.c | |
parent | 4f3dcf3864c3cbd8a6ebc6af38e53d57e4d421d6 (diff) | |
parent | b6bb5e09e0ad1f61f96c65bbc870bd493df12f1a (diff) |
Merge commit 'origin/master' into gallium-0.2
Diffstat (limited to 'src/mesa/main/texstore.c')
-rw-r--r-- | src/mesa/main/texstore.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index c1fafbae30b..7278180a5cc 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -3719,6 +3719,14 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, /* general case: convert row to RGBA format */ GLfloat rgba[MAX_WIDTH][4]; GLint col; + GLbitfield transferOps = 0x0; + + if (type == GL_FLOAT && + ((ctx->Color.ClampReadColor == GL_TRUE) || + (ctx->Color.ClampReadColor == GL_FIXED_ONLY_ARB && + texImage->TexFormat->DataType != GL_FLOAT))) + transferOps |= IMAGE_CLAMP_BIT; + for (col = 0; col < width; col++) { (*texImage->FetchTexelf)(texImage, col, row, img, rgba[col]); if (texImage->TexFormat->BaseFormat == GL_ALPHA) { @@ -3743,7 +3751,7 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level, } _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format, type, dest, - &ctx->Pack, 0x0 /*image xfer ops*/); + &ctx->Pack, transferOps /*image xfer ops*/); } /* format */ } /* row */ } /* img */ |