summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Brezillon <[email protected]>2019-08-27 11:12:02 +0200
committerBoris Brezillon <[email protected]>2019-08-27 16:50:52 +0200
commit0142dcb990eee047af9e7f520bf7a27f6ef765b1 (patch)
tree498c080f545af1d7ef873c19ac205a37b03d0aff /src
parent5882e0def97a47aff050f5a3f412b97a7f440e27 (diff)
panfrost: Make sure bundle.instructions[] contains valid instructions
Add an assert() in schedule_bundle() to make sure all instruction pointers in bundle.instructions[] are valid. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/panfrost/midgard/midgard_schedule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index f80a0354fb8..60ad5ebb79c 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -562,6 +562,7 @@ schedule_bundle(compiler_context *ctx, midgard_block *block, midgard_instruction
midgard_instruction *uins = ins;
for (; packed_idx < bundle.instruction_count; ++packed_idx) {
+ assert(&uins->link != &block->instructions);
bundle.instructions[packed_idx] = uins;
uins = mir_next_op(uins);
}