summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3/ir3.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-04-04 20:22:57 -0400
committerRob Clark <[email protected]>2017-04-14 12:46:12 -0400
commit331bd3b5e10f189b1e8cd6fdf087a892efa9a6b8 (patch)
tree34a7976328844782900d098d77c3a372f118dbee /src/gallium/drivers/freedreno/ir3/ir3.c
parent870760e02e7388455c4af4e15f9e4c7e680e4b4d (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3.c')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3.c10
1 files changed, 2 insertions, 8 deletions
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);
}
}