Mesa (master): mesa: implement unpack_SIGNED_GR1616 in format_unpack.c
Brian Paul
brianp at kemper.freedesktop.org
Sat Sep 17 19:37:06 UTC 2011
Module: Mesa
Branch: master
Commit: f0f28548c29690fc9e44a2f7b0d1965d9fc564fa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0f28548c29690fc9e44a2f7b0d1965d9fc564fa
Author: Brian Paul <brianp at vmware.com>
Date: Sat Sep 17 13:33:04 2011 -0600
mesa: implement unpack_SIGNED_GR1616 in format_unpack.c
---
src/mesa/main/format_unpack.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 02b5720..dadff05 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
More information about the mesa-commit
mailing list