On Nov 6, 2015 12:21 PM, "Matt Turner" <matts...@gmail.com> wrote:
>
> On Fri, Nov 6, 2015 at 8:27 AM, Juan A. Suarez Romero
> <jasua...@igalia.com> wrote:
> > Replace the current loop by a direct call to _mesa_fls() function.
> >
> > It also fixes an implicit bug in the current code where num_textures
> > seems to be one value less than it should be when
sh->Program->SamplersUsed > 0.
> >
> > For instance, num_textures is 0 instead of 1 when
> > sh->Program->SamplersUsed is 1.
>
> Looks good to me, and we use _mesa_fls elsewhere to do this same
calculation.
>
> Reviewed-by: Matt Turner <matts...@gmail.com>
>
> Jason, was there some reason we weren't doing this? I'm confused why
> we would have had a one-line comment and a 4-line loop when the all we
> needed to do was call one functon?

I didn't want to pull a non-inline mesa function into NIR and add a link
dependency and I was too lazy to move it into util.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to