aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/format_unpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/format_unpack.c')
-rw-r--r--mesalib/src/mesa/main/format_unpack.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/format_unpack.c b/mesalib/src/mesa/main/format_unpack.c
index c5146f72d..dadff0556 100644
--- a/mesalib/src/mesa/main/format_unpack.c
+++ b/mesalib/src/mesa/main/format_unpack.c
@@ -921,7 +921,11 @@ unpack_SIGNED_R16(const void *src, GLfloat dst[4])
static void
unpack_SIGNED_GR1616(const void *src, GLfloat dst[4])
{
- /* XXX TODO */
+ const GLuint s = *((const GLuint *) src);
+ dst[RCOMP] = SHORT_TO_FLOAT_TEX( s & 0xffff );
+ dst[GCOMP] = SHORT_TO_FLOAT_TEX( s >> 16 );
+ dst[BCOMP] = 0.0F;
+ dst[ACOMP] = 1.0F;
}
static void
@@ -947,7 +951,7 @@ unpack_SIGNED_RGBA_16(const void *src, GLfloat dst[4])
static void
unpack_RGBA_16(const void *src, GLfloat dst[4])
{
- const GLshort *s = (const GLshort *) src;
+ const GLushort *s = (const GLushort *) src;
dst[RCOMP] = USHORT_TO_FLOAT( s[0] );
dst[GCOMP] = USHORT_TO_FLOAT( s[1] );
dst[BCOMP] = USHORT_TO_FLOAT( s[2] );