nir: Validate after deserialization.
authorEmma Anholt <emma@anholt.net>
Tue, 13 Jul 2021 23:31:52 +0000 (16:31 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 15 Jul 2021 18:43:42 +0000 (18:43 +0000)
commitbb35195b73824d2aa4ac89aa80ff84f54bc9b108
treea54988722696dcf1d1fec55f83387d00a8f5fbe7
parentf855b25fd0091d76a2ed6dc9f5c873d75a1c78d8
nir: Validate after deserialization.

It's a particularly relevant place for NIR bugs to occur, and if you make
a mistake in this code it gets caught in your debug build in something
like mesa/st's call to nir_split_var_copies() during finalization, which is
rather misleading.

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