[Mesa-dev] [PATCH] mesa: re-implement unpacking of DEPTH_COMPONENT32F
Marek Olšák
maraeo at gmail.com
Tue Nov 22 12:07:20 PST 2011
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43122
---
src/mesa/main/format_unpack.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
index 6e2ce7a..52f224a 100644
--- a/src/mesa/main/format_unpack.c
+++ b/src/mesa/main/format_unpack.c
@@ -1751,6 +1751,13 @@ unpack_float_z_Z32(GLuint n, const void *src, GLfloat *dst)
}
static void
+unpack_float_z_Z32F(GLuint n, const void *src, GLfloat *dst)
+{
+ const GLfloat *s = ((const GLfloat *) src);
+ memcpy(dst, s, n * sizeof(float));
+}
+
+static void
unpack_float_z_Z32X24S8(GLuint n, const void *src, GLfloat *dst)
{
const GLfloat *s = ((const GLfloat *) src);
@@ -1783,6 +1790,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;
--
1.7.5.4
More information about the mesa-dev
mailing list