From 74140c2e859c15593a379cbde96b1048f2ad69dc Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 15 Jun 2020 11:15:52 -0700 Subject: freedreno/ir3: convert over to ralloc The `ir3_shader` is the root mem ctx, with `ir3_shader_variant` hanging off that, and various variant specific allocations hanging off the variant. This lets us delete a bunch of cleanup code. Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3_assembler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/freedreno/ir3/ir3_assembler.c') diff --git a/src/freedreno/ir3/ir3_assembler.c b/src/freedreno/ir3/ir3_assembler.c index 99104243a53..005f52859a8 100644 --- a/src/freedreno/ir3/ir3_assembler.c +++ b/src/freedreno/ir3/ir3_assembler.c @@ -34,12 +34,12 @@ struct ir3_shader * ir3_parse_asm(struct ir3_compiler *c, struct ir3_kernel_info *info, FILE *in) { - struct ir3_shader *shader = calloc(1, sizeof(*shader)); + struct ir3_shader *shader = rzalloc_size(NULL, sizeof(*shader)); shader->compiler = c; shader->type = MESA_SHADER_COMPUTE; mtx_init(&shader->variants_lock, mtx_plain); - struct ir3_shader_variant *v = calloc(1, sizeof(*v)); + struct ir3_shader_variant *v = rzalloc_size(shader, sizeof(*v)); v->type = MESA_SHADER_COMPUTE; v->shader = shader; -- cgit v1.2.3