v3d/tex: handle correctly coordinates for cube/cubearrays images
authorAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 26 Jun 2020 13:32:31 +0000 (15:32 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 3 Jul 2020 08:14:57 +0000 (08:14 +0000)
commitf8946bd705ce8cfaf0d2d571fefcf67161f9c5d5
tree99a05e61c2dee050132f8462edac3edc8ce39614
parent0b6e03b8481ffd332946302305ed6535803bc55a
v3d/tex: handle correctly coordinates for cube/cubearrays images

When fetching for cube maps, we need to interpret them as 2d texture
arrays, being the third coordinate the index for the face.

Fixes Vulkan CTS tests like the following using v3dv:

dEQP-VK.binding_model.shader_access.primary_cmd_buf.storage_image.fragment.single_descriptor.cube_base_mip
dEQP-VK.binding_model.shader_access.primary_cmd_buf.storage_image.compute.multiple_descriptor_sets.multiple_contiguous_descriptors.cube_array_base_mip

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5675>
src/broadcom/compiler/v3d40_tex.c