aco: fix nir_texop_texture_samples with NULL descriptors
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 27 Apr 2020 15:02:18 +0000 (17:02 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 07:29:54 +0000 (07:29 +0000)
commita112ec4c11a319ef28451e0fd4cd8320adbf7ae8
tree4916db1c6bb543bc2b93ce3d13554c3480ad719d
parentaa94213781447525e2e5da90ee9c72ad0a57527f
aco: 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: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4775>
src/amd/compiler/aco_instruction_selection.cpp