summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texstore.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index c65b9a99d8..28e9d5c3ec 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -4115,9 +4115,11 @@ _mesa_get_teximage(GLcontext *ctx, GLenum target, GLint level,
* Looks like we need clamp though when going from format
* containing negative values to unsigned format.
*/
- if (!type_with_negative_values(type) &&
- (texImage->TexFormat->DataType == GL_FLOAT ||
- texImage->TexFormat->DataType == GL_SIGNED_NORMALIZED))
+ if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA)
+ transferOps |= IMAGE_CLAMP_BIT;
+ else if (!type_with_negative_values(type) &&
+ (texImage->TexFormat->DataType == GL_FLOAT ||
+ texImage->TexFormat->DataType == GL_SIGNED_NORMALIZED))
transferOps |= IMAGE_CLAMP_BIT;
for (col = 0; col < width; col++) {
@@ -4144,7 +4146,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, transferOps, GL_TRUE);
+ &ctx->Pack, transferOps, GL_FALSE);
} /* format */
} /* row */
} /* img */