projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd8e658
)
mesa: fix AL44 texture fetch function nybble -> float conversion
author
Brian Paul
<brianp@vmware.com>
Tue, 4 Jan 2011 00:14:21 +0000
(17:14 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 4 Jan 2011 00:16:48 +0000
(17:16 -0700)
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32804
src/mesa/main/texfetch_tmp.h
patch
|
blob
|
history
diff --git
a/src/mesa/main/texfetch_tmp.h
b/src/mesa/main/texfetch_tmp.h
index 2de41f31d0e70cc7659dd92a4784a84e39042191..9d57ad7679bd2a59b8d5acca0746ba7f1412d7e0 100644
(file)
--- 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