It was being memset to 0 previously.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
dump_assembly(p->store, annotation.ann_count, annotation.ann,
p->devinfo);
- ralloc_free(annotation.ann);
+ ralloc_free(annotation.mem_ctx);
}
compiler->shader_debug_log(log_data,
dump_assembly(p->store, annotation.ann_count, annotation.ann,
p->devinfo);
- ralloc_free(annotation.ann);
+ ralloc_free(annotation.mem_ctx);
}
compiler->shader_debug_log(log_data,
struct annotation_info *annotation, const struct cfg_t *cfg,
struct backend_instruction *inst, unsigned offset)
{
+ if (annotation->mem_ctx == NULL)
+ annotation->mem_ctx = ralloc_context(NULL);
+
if (annotation->ann_size <= annotation->ann_count) {
int old_size = annotation->ann_size;
annotation->ann_size = MAX2(1024, annotation->ann_size * 2);