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@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
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);
ctx->blend_constant_offset = offset * 0x10;
}
- while(skip--)
- ins = mir_next_op(ins);
-
block->quadword_count += quadword_size(bundle.tag);
}