From 7bd2c5d1f98d0cfcf896a58c3d66713165f6bedd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 3 Jan 2011 17:14:21 -0700 Subject: mesa: fix AL44 texture fetch function nybble -> float conversion Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32804 --- src/mesa/main/texfetch_tmp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h index 2de41f31d0..9d57ad7679 100644 --- a/src/mesa/main/texfetch_tmp.h +++ b/src/mesa/main/texfetch_tmp.h @@ -899,8 +899,8 @@ static void FETCH(f_al44)( const struct gl_texture_image *texImage, const GLubyte s = *TEXEL_ADDR(GLubyte, texImage, i, j, k, 1); texel[RCOMP] = texel[GCOMP] = - texel[BCOMP] = UBYTE_TO_FLOAT( (s & 0x0f) << 4 ); - texel[ACOMP] = UBYTE_TO_FLOAT( s & 0xf0 ); + texel[BCOMP] = (s & 0xf) * (1.0F / 15.0F); + texel[ACOMP] = ((s >> 4) & 0xf) * (1.0F / 15.0F); } #if DIM == 3 -- cgit v1.2.3