Module: Mesa Branch: master Commit: 7bd2c5d1f98d0cfcf896a58c3d66713165f6bedd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7bd2c5d1f98d0cfcf896a58c3d66713165f6bedd
Author: Brian Paul <bri...@vmware.com> Date: Mon Jan 3 17:14:21 2011 -0700 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 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h index 2de41f3..9d57ad7 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 _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit