From 0ef5e19874ba21f268c5ffdfff0b2819056ba51a Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 26 Jun 2020 15:14:20 -0400 Subject: [PATCH] zink: add some asserts for building access chains in ntv we're never going to pass a 0 here, and it's going to be an error if we do Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c index 8bcad066601..530036d3d70 100644 --- a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c +++ b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c @@ -351,6 +351,8 @@ spirv_builder_emit_access_chain(struct spirv_builder *b, SpvId result_type, SpvId base, const SpvId indexes[], size_t num_indexes) { + assert(base); + assert(result_type); SpvId result = spirv_builder_new_id(b); int words = 4 + num_indexes; -- 2.30.2