[Mesa-dev] [PATCH 3/5] panfrost: Fix a list_assert() in schedule_block()
Boris Brezillon
boris.brezillon at collabora.com
Tue Aug 27 10:36:42 UTC 2019
list_for_each_entry() does not allow modifying the current item pointer.
Let's rework the skip-instructions logic in schedule_block() to not
break this rule.
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
---
src/panfrost/midgard/midgard_schedule.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index f80a0354fb88..57b0904cf007 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -581,8 +581,11 @@ schedule_block(compiler_context *ctx, midgard_block *block)
block->quadword_count = 0;
+ int skip = 0;
mir_foreach_instr_in_block(block, ins) {
- int skip;
+ if (skip--)
+ continue;
+
midgard_bundle bundle = schedule_bundle(ctx, block, ins, &skip);
util_dynarray_append(&block->bundles, midgard_bundle, bundle);
@@ -592,9 +595,6 @@ schedule_block(compiler_context *ctx, midgard_block *block)
ctx->blend_constant_offset = quadwords_within_block * 0x10;
}
- while(skip--)
- ins = mir_next_op(ins);
-
block->quadword_count += quadword_size(bundle.tag);
}
--
2.21.0
More information about the mesa-dev
mailing list