Switch to use memory allocations which zero memory for places
where needed.
v2: modify and rebase on top of Marek's series (Tapani)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
return false;
}
- tfeedback_decls = ralloc_array(mem_ctx, tfeedback_decl,
- num_tfeedback_decls);
+ tfeedback_decls = rzalloc_array(mem_ctx, tfeedback_decl,
+ num_tfeedback_decls);
if (!parse_tfeedback_decls(ctx, prog, mem_ctx, num_tfeedback_decls,
varying_names, tfeedback_decls))
return false;
init_ralloc_type_ctx();
assert(name != NULL);
this->name = ralloc_strdup(this->mem_ctx, name);
- this->fields.structure = ralloc_array(this->mem_ctx,
- glsl_struct_field, length);
+ this->fields.structure = rzalloc_array(this->mem_ctx,
+ glsl_struct_field, length);
for (i = 0; i < length; i++) {
this->fields.structure[i] = fields[i];
this->fields.structure[i].name = ralloc_strdup(this->fields.structure,