From 331bd3b5e10f189b1e8cd6fdf087a892efa9a6b8 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 4 Apr 2017 20:22:57 -0400 Subject: freedreno/ir3: convert dynamic arrays to ralloc Want to move one of these under ir3_block, so that gives a reason to migrate the remaining malloc/realloc to ralloc. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/ir3/ir3.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gallium/drivers/freedreno/ir3/ir3.c') diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c index 7c925ee7cb0..c5a030282d8 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.c +++ b/src/gallium/drivers/freedreno/ir3/ir3.c @@ -63,12 +63,6 @@ struct ir3 * ir3_create(struct ir3_compiler *compiler, void ir3_destroy(struct ir3 *shader) { - /* TODO convert the dynamic array to ralloc too: */ - free(shader->indirects); - free(shader->predicates); - free(shader->baryfs); - free(shader->keeps); - free(shader->astc_srgb); ralloc_free(shader); } @@ -626,7 +620,7 @@ static void insert_instr(struct ir3_block *block, list_addtail(&instr->node, &block->instr_list); if (is_input(instr)) - array_insert(shader->baryfs, instr); + array_insert(shader, shader->baryfs, instr); } struct ir3_block * ir3_block_create(struct ir3 *shader) @@ -729,7 +723,7 @@ ir3_instr_set_address(struct ir3_instruction *instr, if (instr->address != addr) { struct ir3 *ir = instr->block->shader; instr->address = addr; - array_insert(ir->indirects, instr); + array_insert(ir, ir->indirects, instr); } } -- cgit v1.2.3