[Mesa-dev] [PATCH v2 4/7] mesa: Fix alpha component in unpack_R8G8B8X8_SRGB.

Richard Sandiford rsandifo at linux.vnet.ibm.com
Tue Jul 22 03:02:08 PDT 2014


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>
---
 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 ae14478..fddb067 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -2154,7 +2154,7 @@ unpack_R8G8B8X8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
       dst[i][RCOMP] = _mesa_nonlinear_to_linear( (s[i]      ) & 0xff );
       dst[i][GCOMP] = _mesa_nonlinear_to_linear( (s[i] >>  8) & 0xff );
       dst[i][BCOMP] = _mesa_nonlinear_to_linear( (s[i] >> 16) & 0xff );
-      dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] >> 24 ); /* linear! */
+      dst[i][ACOMP] = 1.0f;
    }
 }
 
-- 
1.8.3.1



More information about the mesa-dev mailing list