i965: Set annotation_info's mem_ctx.
It was being memset to 0 previously. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
@@ -2267,7 +2267,7 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
|
||||
|
||||
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,
|
||||
|
||||
@@ -1560,7 +1560,7 @@ generate_code(struct brw_codegen *p,
|
||||
|
||||
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,
|
||||
|
||||
@@ -86,6 +86,9 @@ void annotate(const struct brw_device_info *devinfo,
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user