Hello,

> +static nir_deref_instr *
> +build_deref_to_next_wildcard(nir_builder *b,
> +                             nir_deref_instr *parent,
> +                             nir_deref_instr ***deref_arr)
> +{
> +   for (; **deref_arr; (*deref_arr)++) {
> +      if ((**deref_arr)->deref_type == nir_deref_type_array_wildcard)
> +         return parent;
> +
> +      parent = nir_build_deref_follower(b, parent, **deref_arr);
> +   }
> +
> +   assert(**deref_arr == NULL);
> +   *deref_arr = NULL;
> +   return parent;
> +}

Question: in a scenario where there are no wildcards in the chain,
could we just return the original deref (i.e. the last element in
deref_arr)?


Thanks,
Caio
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to