Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-31 Thread Jason Ekstrand
On Mon, Jul 30, 2018 at 12:00 PM Caio Marcelo de Oliveira Filho < caio.olive...@intel.com> wrote: > > > > +static int > > > > +num_arrays_in_type(const struct glsl_type *type) > > > > +{ > > > > + int num_arrays = 0; > > > > + while (true) { > > > > + if (glsl_type_is_array(type) || glsl_

Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-30 Thread Caio Marcelo de Oliveira Filho
> > > +static int > > > +num_arrays_in_type(const struct glsl_type *type) > > > +{ > > > + int num_arrays = 0; > > > + while (true) { > > > + if (glsl_type_is_array(type) || glsl_type_is_matrix(type)) { > > > + num_arrays++; > > > + type = glsl_get_array_element(type); > >

Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-28 Thread Jason Ekstrand
On Fri, Jul 27, 2018 at 4:17 PM Timothy Arceri wrote: > On 27/07/18 02:00, Jason Ekstrand wrote: > > This pass looks for array variables where at least one level of the > > array is never indirected and splits it into multiple smaller variables. > > --- > > src/compiler/nir/nir.h|

Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-28 Thread Jason Ekstrand
On Thu, Jul 26, 2018 at 4:53 PM Caio Marcelo de Oliveira Filho < caio.olive...@intel.com> wrote: > Hi, > > A few comments and questions. I still haven't finished reading > emit_split_copies(), though. > > > On Thu, Jul 26, 2018 at 09:00:03AM -0700, Jason Ekstrand wrote: > > This pass looks for arr

Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-27 Thread Timothy Arceri
On 27/07/18 02:00, Jason Ekstrand wrote: This pass looks for array variables where at least one level of the array is never indirected and splits it into multiple smaller variables. --- src/compiler/nir/nir.h| 1 + src/compiler/nir/nir_split_vars.c | 525 +

Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-26 Thread Caio Marcelo de Oliveira Filho
Hi, A few comments and questions. I still haven't finished reading emit_split_copies(), though. On Thu, Jul 26, 2018 at 09:00:03AM -0700, Jason Ekstrand wrote: > This pass looks for array variables where at least one level of the > array is never indirected and splits it into multiple smaller va

Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-26 Thread Jason Ekstrand
FYI, after further consideration, I've started reworking this pass to also be able to shorten arrays even if it can't split them. Probably best to wait on review for v2. On July 26, 2018 09:00:57 Jason Ekstrand wrote: This pass looks for array variables where at least one level of the array