aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/format_unpack.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
commita0b4a1330be6a36ad095222d2ea83927cd33514d (patch)
tree616920ca608751e843c92c9815069f43789e3097 /mesalib/src/mesa/main/format_unpack.c
parent45710577f374972946a8eb37833a9c94e5a299bf (diff)
downloadvcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip
mesa xserver pixman git update 25 nov 2011
Diffstat (limited to 'mesalib/src/mesa/main/format_unpack.c')
-rw-r--r--mesalib/src/mesa/main/format_unpack.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/format_unpack.c b/mesalib/src/mesa/main/format_unpack.c
index 6e2ce7a05..080392f2b 100644
--- a/mesalib/src/mesa/main/format_unpack.c
+++ b/mesalib/src/mesa/main/format_unpack.c
@@ -936,7 +936,7 @@ unpack_INTENSITY_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
dst[i][RCOMP] =
dst[i][GCOMP] =
dst[i][BCOMP] =
- dst[i][ACOMP] = s[i];
+ dst[i][ACOMP] = _mesa_half_to_float(s[i]);
}
}
@@ -1751,6 +1751,12 @@ unpack_float_z_Z32(GLuint n, const void *src, GLfloat *dst)
}
static void
+unpack_float_z_Z32F(GLuint n, const void *src, GLfloat *dst)
+{
+ memcpy(dst, src, n * sizeof(float));
+}
+
+static void
unpack_float_z_Z32X24S8(GLuint n, const void *src, GLfloat *dst)
{
const GLfloat *s = ((const GLfloat *) src);
@@ -1783,6 +1789,9 @@ _mesa_unpack_float_z_row(gl_format format, GLuint n,
case MESA_FORMAT_Z32:
unpack = unpack_float_z_Z32;
break;
+ case MESA_FORMAT_Z32_FLOAT:
+ unpack = unpack_float_z_Z32F;
+ break;
case MESA_FORMAT_Z32_FLOAT_X24S8:
unpack = unpack_float_z_Z32X24S8;
break;
@@ -1959,7 +1968,8 @@ _mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n,
unpack_uint_24_8_depth_stencil_S8_Z24(src, dst, n);
break;
default:
- _mesa_problem(NULL, "bad format %s in _mesa_unpack_ubyte_s_row",
+ _mesa_problem(NULL,
+ "bad format %s in _mesa_unpack_uint_24_8_depth_stencil_row",
_mesa_get_format_name(format));
return;
}