aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/format_unpack.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-02-01 08:36:02 +0100
committermarha <marha@users.sourceforge.net>2012-02-01 08:36:02 +0100
commit68320ff05946f092b6836754c6267b1dff2f4633 (patch)
tree424d73f509dff521d4cc22a95369594b7ee56dad /mesalib/src/mesa/main/format_unpack.c
parent71b5bea4d5ef75f50bd7bd7b93f47f8552c178e0 (diff)
parent58ff764d4111bfaa7360c57bc62dd620fbdce06f (diff)
downloadvcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.tar.gz
vcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.tar.bz2
vcxsrv-68320ff05946f092b6836754c6267b1dff2f4633.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/format_unpack.c')
-rw-r--r--mesalib/src/mesa/main/format_unpack.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/format_unpack.c b/mesalib/src/mesa/main/format_unpack.c
index a2d889116..cd16a9ea6 100644
--- a/mesalib/src/mesa/main/format_unpack.c
+++ b/mesalib/src/mesa/main/format_unpack.c
@@ -2393,6 +2393,51 @@ unpack_int_rgba_LUMINANCE_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
}
static void
+unpack_int_rgba_LUMINANCE_UINT16(const GLushort *src, GLuint dst[][4], GLuint n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++) {
+ dst[i][0] = dst[i][1] = dst[i][2] = src[i];
+ dst[i][3] = 1;
+ }
+}
+
+static void
+unpack_int_rgba_LUMINANCE_INT16(const GLshort *src, GLuint dst[][4], GLuint n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++) {
+ dst[i][0] = dst[i][1] = dst[i][2] = src[i];
+ dst[i][3] = 1;
+ }
+}
+
+static void
+unpack_int_rgba_LUMINANCE_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++) {
+ dst[i][0] = dst[i][1] = dst[i][2] = src[i];
+ dst[i][3] = 1;
+ }
+}
+
+static void
+unpack_int_rgba_LUMINANCE_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
+{
+ unsigned int i;
+
+ for (i = 0; i < n; i++) {
+ dst[i][0] = dst[i][1] = dst[i][2] = src[i];
+ dst[i][3] = 1;
+ }
+}
+
+
+static void
unpack_int_rgba_LUMINANCE_ALPHA_UINT32(const GLuint *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
@@ -2618,6 +2663,19 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n,
case MESA_FORMAT_LUMINANCE_INT32:
unpack_int_rgba_LUMINANCE_UINT32(src, dst, n);
break;
+ case MESA_FORMAT_LUMINANCE_UINT16:
+ unpack_int_rgba_LUMINANCE_UINT16(src, dst, n);
+ break;
+ case MESA_FORMAT_LUMINANCE_INT16:
+ unpack_int_rgba_LUMINANCE_INT16(src, dst, n);
+ break;
+
+ case MESA_FORMAT_LUMINANCE_UINT8:
+ unpack_int_rgba_LUMINANCE_UINT8(src, dst, n);
+ break;
+ case MESA_FORMAT_LUMINANCE_INT8:
+ unpack_int_rgba_LUMINANCE_INT8(src, dst, n);
+ break;
case MESA_FORMAT_LUMINANCE_ALPHA_UINT32:
case MESA_FORMAT_LUMINANCE_ALPHA_INT32: