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 <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5911>
This commit is contained in:
Mike Blumenkrantz
2020-06-26 15:14:20 -04:00
committed by Marge Bot
parent 2af22051c0
commit 0ef5e19874

View File

@@ -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;