mesa: do depth/stencil format conversion in glGetTexImage
authorBrian Paul <brianp@vmware.com>
Thu, 27 Feb 2014 15:36:13 +0000 (08:36 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 28 Feb 2014 14:02:55 +0000 (07:02 -0700)
commit43dee0295e5da42425f1a3b6a3b3108173f4b676
treef889113e53736a71054b6ace3b4d5e687e22414d
parent84787aae958d6cf07316950fbd3970d2a1cce4a3
mesa: do depth/stencil format conversion in glGetTexImage

glGetTexImage(GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8) was just
using memcpy() instead of _mesa_unpack_uint_24_8_depth_stencil_row()
to convert texels from the hardware format to the GL format.

Fixes issue reported by David Meng at Intel.  The new piglit
ext_packed_depth_stencil-getteximage test checks for this bug.

Also, add some format/type assertions.  We don't yet handle the
GL_FLOAT_32_UNSIGNED_INT_24_8_REV type.  That should be fixed in
a follow-on patch.

Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
src/mesa/main/texgetimage.c