summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c
index 60455d50f86..0ab81d4d714 100644
--- a/src/gallium/drivers/vc4/vc4_qir.c
+++ b/src/gallium/drivers/vc4/vc4_qir.c
@@ -283,8 +283,22 @@ qir_compile_init(void)
}
void
+qir_remove_instruction(struct qinst *qinst)
+{
+ remove_from_list(&qinst->link);
+ free(qinst->src);
+ free(qinst);
+}
+
+void
qir_compile_destroy(struct vc4_compile *c)
{
+ while (!is_empty_list(&c->instructions)) {
+ struct qinst *qinst =
+ (struct qinst *)first_elem(&c->instructions);
+ qir_remove_instruction(qinst);
+ }
+
ralloc_free(c);
}