nir,spirv: add sparse texture fetches
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 20 Nov 2020 15:10:42 +0000 (15:10 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 6 Jan 2021 20:36:38 +0000 (20:36 +0000)
commit3a7972f72a530ebb1b8c1b1eb660f2506d841ae4
treedd6d070226e7ab6f8f85367bba771be292aa0e19
parent95819663b71cff2977849d84a7dc70f62ed2a262
nir,spirv: add sparse texture fetches

Like SPIR-V and GL_ARB_sparse_texture2, these return a residency code. It
is placed in the destination after the rest of the result. If it's zero,
then the texel is resident. Otherwise, it's not resident.

Besides the larger destination and the residency code, sparse fetches
work the same as normal fetches.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7774>
src/compiler/nir/nir.h
src/compiler/nir/nir_clone.c
src/compiler/nir/nir_print.c
src/compiler/nir/nir_serialize.c
src/compiler/spirv/spirv_to_nir.c