From: Brian Paul Date: Sat, 17 Sep 2011 19:33:04 +0000 (-0600) Subject: mesa: implement unpack_SIGNED_GR1616 in format_unpack.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0f28548c29690fc9e44a2f7b0d1965d9fc564fa;p=mesa.git mesa: implement unpack_SIGNED_GR1616 in format_unpack.c --- diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 02b57205ed5..dadff05567e 100644 --- a/src/mesa/main/format_unpack.c +++ b/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