From: Connor Abbott Date: Thu, 9 Jul 2015 01:50:16 +0000 (-0400) Subject: nir/spirv: zero out value array X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4292ac03929485c6419a40541201e14b874f160;p=mesa.git 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. --- 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 */