> diff --git a/src/compiler/nir/nir_lower_io_arrays_to_elements.c 
> b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
> index 9a5eec8f870..7753f85824d 100644
> --- a/src/compiler/nir/nir_lower_io_arrays_to_elements.c
> +++ b/src/compiler/nir/nir_lower_io_arrays_to_elements.c
> @@ -194,12 +194,13 @@ lower_array(nir_builder *b, nir_intrinsic_instr *intr, 
> nir_variable *var,
>     nir_instr_remove(&intr->instr);
>  }
>  
> -static bool
> -deref_has_indirect(nir_builder *b, nir_variable *var, nir_deref_var *deref)
> +bool
> +nir_deref_has_indirect(gl_shader_stage stage, nir_deref_var *deref)
>  {
> +   const nir_variable *const var = deref->var;
>     nir_deref *tail = &deref->deref;
>  
> -   if (nir_is_per_vertex_io(var, b->shader->info.stage)) {
> +   if (nir_is_per_vertex_io(var, stage)) {
>        tail = tail->child;
>     }

I somewhat feel this name is more general than what the function does
(there's a skipping of certain variables going on).

Not directly appliable, but see also from Jason Friday's series:

[PATCH v2 2/9] nir: Add a deref_instr_has_indirect helper


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

Reply via email to