mesa: fix texture view use of _mesa_get_tex_image()
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 8 Dec 2013 06:04:40 +0000 (19:04 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sat, 14 Dec 2013 03:32:41 +0000 (16:32 +1300)
commit8bb666cee30ec8e38f6a22c1d17216deda272bbc
tree99c9dd65dfc6df7c7af5fe9eab9144bffcc82531
parent544869377d6ec8c150d4d91d17a01f22cd84d479
mesa: fix texture view use of _mesa_get_tex_image()

The target parameter to _mesa_get_tex_image() is a target enum, not an index.
When we're setting up faces for a cubemap, it should be
CUBE_MAP_POSITIVE_X .. CUBE_MAP_NEGATIVE_Z; for all other targets it
should be the same as the texobj's target.

Fixes broken cubemaps [had only +X face but claimed to have all] produced by
glTextureView, which then caused various crashes in the driver when we
tried to use them.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/textureview.c