From 6fe0ced7df1cc6dd42c20f76559fdfa8aa60a039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 18 Apr 2011 22:52:31 +0200 Subject: [PATCH] test --- src/mesa/main/pack.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 4bb0a90..8b58cc3 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -504,6 +504,17 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4], luminance = NULL; } + /* XXX + * This test should probably go away. Have the caller set/clear the + * IMAGE_CLAMP_BIT as needed. + */ + if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) { + if (!intDstFormat) { + /* need to clamp to [0, 1] */ + transferOps |= IMAGE_CLAMP_BIT; + } + } + if (transferOps) { _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba); } -- 1.7.1