summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_opt_perspective.c
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2019-08-28 09:17:21 +0200
committerBoris Brezillon <[email protected]>2019-08-28 17:50:01 +0200
commit938c5b0148688f426235e81d6573f25e5021ceb7 (patch)
tree819b1716d1ece65028d330222b6b48c5cd22bbd2 /src/panfrost/midgard/midgard_opt_perspective.c
parent6e01575b6817d4e3b243a09b0cea90fdb5d40d2f (diff)
panfrost: Use ralloc() to allocate instructions to avoid leaking those objs
Instructions attached to blocks are never explicitly freed. Let's use ralloc() to attach those objects to the compiler context so that they are automatically freed when the ctx object is freed. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_opt_perspective.c')
-rw-r--r--src/panfrost/midgard/midgard_opt_perspective.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_opt_perspective.c b/src/panfrost/midgard/midgard_opt_perspective.c
index feec5a5be39..aa4c58c470c 100644
--- a/src/panfrost/midgard/midgard_opt_perspective.c
+++ b/src/panfrost/midgard/midgard_opt_perspective.c
@@ -125,7 +125,7 @@ midgard_opt_combine_projection(compiler_context *ctx, midgard_block *block)
}
};
- mir_insert_instruction_before(ins, accel);
+ mir_insert_instruction_before(ctx, ins, accel);
mir_remove_instruction(ins);
progress |= true;