diff options
author | Brian Paul <[email protected]> | 2011-12-01 16:37:49 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-02 07:22:40 -0700 |
commit | 19b102517234cc28056ce366a159d18eadab043f (patch) | |
tree | 753fc628916f0e6b7bcf3c3ccfed08a482d323a0 | |
parent | bbbab8de63bc95fef261447b75225bc57c5d8122 (diff) |
mesa: add casts to fix unpack_SIGNED_GR1616()
We were passing unsigned values to the macro before.
-rw-r--r-- | src/mesa/main/format_unpack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 565a8d05989..f821c2be4f4 100644 --- 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; } |