nir/validate: validate intr->num_components
authorRob Clark <robdclark@chromium.org>
Mon, 8 Jun 2020 16:52:28 +0000 (09:52 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Jun 2020 02:48:18 +0000 (02:48 +0000)
commit167fa2887f0928042dcb21bbc2fa89ae9a29897d
tree42a64bd7407ae5182de72f6a8077021f4a2b8ece
parentbe16833d9674ff3795b420a73b8ae2e1367bb0e2
nir/validate: validate intr->num_components

Validate that num_components is only set for vectorized instructions, to
prevent other nir passes or driver backends from mistakenly relying on
num_components for non-vectorized instructions.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371>
src/compiler/nir/nir_validate.c