On Tue, 27 Aug 2019 12:36:42 +0200
Boris Brezillon <[email protected]> wrote:

> 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]>
> ---
>  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;
> +

Hm, should be

                if (skip) {
                        skip--;
                        continue;
                }

I'll fix that in v2.

>                  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);
>          }
>  

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to