<br><br><div class="gmail_quote">On Tue, Nov 22, 2011 at 2:07 PM, Marek Olšák <span dir="ltr"><<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=43122" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=43122</a><br>
---<br>
src/mesa/main/format_unpack.c | 10 ++++++++++<br>
1 files changed, 10 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c<br>
index 6e2ce7a..52f224a 100644<br>
--- a/src/mesa/main/format_unpack.c<br>
+++ b/src/mesa/main/format_unpack.c<br>
@@ -1751,6 +1751,13 @@ unpack_float_z_Z32(GLuint n, const void *src, GLfloat *dst)<br>
}<br>
<br>
static void<br>
+unpack_float_z_Z32F(GLuint n, const void *src, GLfloat *dst)<br>
+{<br>
+ const GLfloat *s = ((const GLfloat *) src);<br>
+ memcpy(dst, s, n * sizeof(float));<br>
+}<br></blockquote><div><br></div><div>Why bother typecasting here in a separate variable 's'?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
+<br>
+static void<br>
unpack_float_z_Z32X24S8(GLuint n, const void *src, GLfloat *dst)<br>
{<br>
const GLfloat *s = ((const GLfloat *) src);<br>
@@ -1783,6 +1790,9 @@ _mesa_unpack_float_z_row(gl_format format, GLuint n,<br>
case MESA_FORMAT_Z32:<br>
unpack = unpack_float_z_Z32;<br>
break;<br>
+ case MESA_FORMAT_Z32_FLOAT:<br>
+ unpack = unpack_float_z_Z32F;<br>
+ break;<br>
case MESA_FORMAT_Z32_FLOAT_X24S8:<br>
unpack = unpack_float_z_Z32X24S8;<br>
break;<br>
<font color="#888888">--<br>
1.7.5.4<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br>