From e4292ac03929485c6419a40541201e14b874f160 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Wed, 8 Jul 2015 21:50:16 -0400 Subject: [PATCH] nir/spirv: zero out value array Before values are pushed or annotated with a name, decoration, etc., they need to have an invalid type, NULL name, NULL decoration, etc. ralloc zero's everything by accident, so this wasn't an issue in practice, but we should be explicitly zero'ing it. --- src/glsl/nir/spirv_to_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index ec26111930a..1c25493b551 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -2788,7 +2788,7 @@ spirv_to_nir(const uint32_t *words, size_t word_count, struct vtn_builder *b = rzalloc(NULL, struct vtn_builder); b->shader = shader; b->value_id_bound = value_id_bound; - b->values = ralloc_array(b, struct vtn_value, value_id_bound); + b->values = rzalloc_array(b, struct vtn_value, value_id_bound); exec_list_make_empty(&b->functions); /* Handle all the preamble instructions */ -- 2.30.2