diff options
author | Boris Brezillon <[email protected]> | 2019-08-27 12:36:42 +0200 |
---|---|---|
committer | Boris Brezillon <[email protected]> | 2019-09-13 11:01:40 +0200 |
commit | 0e513ccca484c9086bdc13181e64c71fb8641649 (patch) | |
tree | 3ffb7ce1609e966028c04af1303e598bd81559a6 /src/panfrost | |
parent | 2eace10c62914708c0d59b3a6151da9e1a3a817c (diff) |
panfrost: Fix a list_assert() in schedule_block()
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 <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/midgard_schedule.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 68b7a0b2fe4..b8d9b5ec9be 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -630,8 +630,13 @@ 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) { + skip--; + continue; + } + midgard_bundle bundle = schedule_bundle(ctx, block, ins, &skip); util_dynarray_append(&block->bundles, midgard_bundle, bundle); @@ -640,9 +645,6 @@ schedule_block(compiler_context *ctx, midgard_block *block) ctx->blend_constant_offset = offset * 0x10; } - while(skip--) - ins = mir_next_op(ins); - block->quadword_count += quadword_size(bundle.tag); } |