gallivm: handle cube map arrays for texture sampling
authorRoland Scheidegger <sroland@vmware.com>
Fri, 29 Aug 2014 23:32:59 +0000 (01:32 +0200)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 29 Aug 2014 23:33:02 +0000 (01:33 +0200)
commit9da75f96bce738d5b2c58e6fe0ce8ad436667c58
tree1bda657b5bf9b36349c5110250e19b25a3618f07
parent26a5156de7e11f21a8690cf159b643e45b4f90a8
gallivm: handle cube map arrays for texture sampling

Pretty easy, just make sure that all paths testing for PIPE_TEXTURE_CUBE
also recognize PIPE_TEXTURE_CUBE_ARRAY, and add the layer * 6 calculation
to the calculated face.
Also handle it for texture size query, looks like OpenGL wants the number
of cubes, not layers (so need division by 6).

No piglit regressions.

v2: fix up adding cube layer to face for seamless filtering (needs to happen
after calculating per-sample face). Undetected by piglit unfortunately.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (v1)
src/gallium/auxiliary/gallivm/lp_bld_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample.h
src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c