summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-01-03 17:14:21 -0700
committerBrian Paul <[email protected]>2011-01-03 17:16:48 -0700
commit7bd2c5d1f98d0cfcf896a58c3d66713165f6bedd (patch)
treee1de1e45b56d84dbebcec9d8de9171aa23ded3b2 /src/mesa
parentbd8e65888452abcc2a96a3804df14dbd41da771e (diff)
mesa: fix AL44 texture fetch function nybble -> float conversion
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32804
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texfetch_tmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h
index 2de41f31d0e..9d57ad7679b 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