summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <connor.w.abbott@intel.com>2015-07-08 21:50:16 -0400
committerConnor Abbott <connor.w.abbott@intel.com>2015-07-08 22:03:30 -0400
commite4292ac03929485c6419a40541201e14b874f160 (patch)
tree9700ba1d9cacd8abad61cb20364db62732b32ff9
parent997831868fea1f56223b5fbf59526d0b538527c0 (diff)
downloadmesa-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.c2
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 */