mesa: fix GetTexImage for 1D array depth textures
authorDave Airlie <airlied@redhat.com>
Tue, 30 Sep 2014 23:22:13 +0000 (09:22 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 3 Oct 2014 00:37:55 +0000 (10:37 +1000)
commit8df3c02cdc0a81db43f63e5a93fbae1b3435d23d
tree5ea3cf6ab3a1ab9dc075b17a1732b1d39c78a927
parentb4ffd19e6c9f61dfa4e0eda1f606cd255b27208f
mesa: fix GetTexImage for 1D array depth textures

While running piglit in virgl, I hit an assert in intel driver.

"qemu-system-x86_64: intel_tex.c:219: intel_map_texture_image: Assertion `tex_image->TexObject->Target != 0x8C18 || h == 1' failed."

Thanks to Eric and Ken for pointing me in the right direction,

Fix the get_tex_depth to do the same fixup as get_tex_rgba does
for 1D array textures.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/texgetimage.c