[Mesa-dev] [PATCH 5/7] i965/nir: Add a nir_lower_uniforms helper

Jason Ekstrand jason at jlekstrand.net
Mon Nov 23 22:20:49 PST 2015


On Nov 23, 2015 20:50, "Matt Turner" <mattst88 at gmail.com> wrote:
>
> On Mon, Nov 23, 2015 at 6:11 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> > This matches what we're already doing for inputs and outputs
> > ---
> >  src/mesa/drivers/dri/i965/brw_nir.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_nir.c
b/src/mesa/drivers/dri/i965/brw_nir.c
> > index 91358d8..e602df7 100644
> > --- a/src/mesa/drivers/dri/i965/brw_nir.c
> > +++ b/src/mesa/drivers/dri/i965/brw_nir.c
> > @@ -171,6 +171,14 @@ brw_nir_lower_outputs(nir_shader *nir, bool
is_scalar)
> >     }
> >  }
> >
> > +static void
> > +brw_nir_lower_uniforms(nir_shader *nir, bool is_scalar)
> > +{
> > +   nir_assign_var_locations(&nir->uniforms,
> > +                            &nir->num_uniforms,
> > +                            is_scalar ? type_size_scalar :
type_size_vec4);
> > +}
> > +
> >  static bool
> >  should_clone_nir()
> >  {
> > @@ -298,6 +306,7 @@ brw_lower_nir(nir_shader *nir,
> >
> >     OPT_V(brw_nir_lower_inputs, devinfo, is_scalar);
> >     OPT_V(brw_nir_lower_outputs, is_scalar);
> > +   OPT_V(brw_nir_lower_uniforms, is_scalar);
> >     nir_assign_var_locations(&nir->uniforms,
> >                              &nir->num_uniforms,
> >                              is_scalar ? type_size_scalar :
type_size_vec4);
>
> Did you mean to delete this?

Yes, yes I did. I'll get that fixed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151123/93749413/attachment.html>


More information about the mesa-dev mailing list