diff options
author | Connor Abbott <connor.w.abbott@intel.com> | 2015-07-08 21:50:16 -0400 |
---|---|---|
committer | Connor Abbott <connor.w.abbott@intel.com> | 2015-07-08 22:03:30 -0400 |
commit | e4292ac03929485c6419a40541201e14b874f160 (patch) | |
tree | 9700ba1d9cacd8abad61cb20364db62732b32ff9 | |
parent | 997831868fea1f56223b5fbf59526d0b538527c0 (diff) | |
download | mesa-e4292ac03929485c6419a40541201e14b874f160.tar.gz |
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.
-rw-r--r-- | src/glsl/nir/spirv_to_nir.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 */ |