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>
This commit is contained in:
Emma Anholt 2021-07-13 16:31:52 -07:00 committed by Marge Bot
parent f855b25fd0
commit bb35195b73
1 changed files with 2 additions and 0 deletions

View File

@ -2102,6 +2102,8 @@ nir_deserialize(void *mem_ctx,
free(ctx.idx_table);
nir_validate_shader(ctx.nir, "after deserialize");
return ctx.nir;
}