ac/llvm: fix nir_texop_texture_samples with NULL descriptors
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 27 Apr 2020 11:04:40 +0000 (13:04 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 07:29:54 +0000 (07:29 +0000)
commitaa94213781447525e2e5da90ee9c72ad0a57527f
tree03d07c90a109e8c43712bbda6da85e72d4655b0f
parenta3cba3c771e68cddb644a3520bcc68bd6dfce07c
ac/llvm: fix nir_texop_texture_samples with NULL descriptors

With VK_EXT_robustness2, descriptors can be NULL and the number of
samples returned by nir_texop_texture_samples should be 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4775>
src/amd/llvm/ac_nir_to_llvm.c