projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbbab8d
)
mesa: add casts to fix unpack_SIGNED_GR1616()
author
Brian Paul
<brianp@vmware.com>
Thu, 1 Dec 2011 23:37:49 +0000
(16:37 -0700)
committer
Brian Paul
<brianp@vmware.com>
Fri, 2 Dec 2011 14:22:40 +0000
(07:22 -0700)
We were passing unsigned values to the macro before.
src/mesa/main/format_unpack.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/format_unpack.c
b/src/mesa/main/format_unpack.c
index 565a8d05989afab6099d345bf4c8ad37303b4f2b..f821c2be4f404373614816edfb4890477351d235 100644
(file)
--- a/
src/mesa/main/format_unpack.c
+++ b/
src/mesa/main/format_unpack.c
@@
-1195,8
+1195,8
@@
unpack_SIGNED_GR1616(const void *src, GLfloat dst[][4], GLuint n)
const GLuint *s = ((const GLuint *) src);
GLuint i;
for (i = 0; i < n; i++) {
- dst[i][RCOMP] = SHORT_TO_FLOAT_TEX(
s[i] & 0xffff
);
- dst[i][GCOMP] = SHORT_TO_FLOAT_TEX(
s[i] >> 16
);
+ dst[i][RCOMP] = SHORT_TO_FLOAT_TEX(
(GLshort) (s[i] & 0xffff)
);
+ dst[i][GCOMP] = SHORT_TO_FLOAT_TEX(
(GLshort) (s[i] >> 16)
);
dst[i][BCOMP] = 0.0F;
dst[i][ACOMP] = 1.0F;
}