Mesa (master): mesa: Fix alpha component in unpack_R8G8B8X8_SRGB.
Dave Airlie
airlied at kemper.freedesktop.org
Wed Sep 17 01:58:05 UTC 2014
Module: Mesa
Branch: master
Commit: 3ff5c6a6c472288fa5f50d880621f38ea94b9c23
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ff5c6a6c472288fa5f50d880621f38ea94b9c23
Author: Richard Sandiford <rsandifo at linux.vnet.ibm.com>
Date: Tue Sep 16 16:28:05 2014 +1000
mesa: Fix alpha component in unpack_R8G8B8X8_SRGB.
The function was using the "X" component as the alpha channel,
rather than setting alpha to 1.0.
Signed-off-by: Richard Sandiford <rsandifo at linux.vnet.ibm.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/mesa/main/format_unpack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index b84ed02..0e2c438 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -2100,7 +2100,7 @@ unpack_R8G8B8X8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
dst[i][RCOMP] = util_format_srgb_8unorm_to_linear_float( (s[i] ) & 0xff );
dst[i][GCOMP] = util_format_srgb_8unorm_to_linear_float( (s[i] >> 8) & 0xff );
dst[i][BCOMP] = util_format_srgb_8unorm_to_linear_float( (s[i] >> 16) & 0xff );
- dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] >> 24 ); /* linear! */
+ dst[i][ACOMP] = 1.0f;
}
}
More information about the mesa-commit
mailing list