[Mesa-dev] [PATCH 1/2] glsl/types: Fix function type comparison function

Jason Ekstrand jason at jlekstrand.net
Thu Jul 14 17:44:40 UTC 2016


On Thu, Jul 14, 2016 at 6:59 AM, Iago Toral <itoral at igalia.com> wrote:

> Both patches are:
> Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
>

Thanks!


>
> On Wed, 2016-07-13 at 14:28 -0700, Jason Ekstrand wrote:
> > It was returning true if the function types have different lengths
> > rather
> > than false.  This was new with the SPIR-V to NIR pass and I thought
> > I'd
> > fixed it a while ago but it may have gotten lost in rebasing
> > somewhere.
> >
> > Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> > Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> > ---
> >  src/compiler/glsl_types.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/compiler/glsl_types.cpp
> > b/src/compiler/glsl_types.cpp
> > index 066a74e..fa27135 100644
> > --- a/src/compiler/glsl_types.cpp
> > +++ b/src/compiler/glsl_types.cpp
> > @@ -1086,7 +1086,7 @@ function_key_compare(const void *a, const void
> > *b)
> >     const glsl_type *const key2 = (glsl_type *) b;
> >
> >     if (key1->length != key2->length)
> > -      return 1;
> > +      return false;
> >
> >     return memcmp(key1->fields.parameters, key2->fields.parameters,
> >                   (key1->length + 1) * sizeof(*key1-
> > >fields.parameters)) == 0;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160714/91819caa/attachment.html>


More information about the mesa-dev mailing list