[Mesa-dev] [PATCH] glsl: OpenGLES GLSL 3.1 precision qualifiers ordering rules

Jordan Justen jordan.l.justen at intel.com
Thu Oct 29 01:01:04 PDT 2015


On 2015-10-29 00:53:01, Ilia Mirkin wrote:
> Would it make sense to just modify the has_420pack function? Or do you
> not want all of it?

Yeah, that was my first thought.

Looking at the OpenGLES 3.1 spec, it seems to not have picked up very
much of 420pack. This was the only part I've noticed so far, but I did
see several parts that did not adopt 420pack changes.

-Jordan

> On Thu, Oct 29, 2015 at 3:47 AM, Jordan Justen
> <jordan.l.justen at intel.com> wrote:
> > The OpenGLES GLSL 3.1 specification uses the precision qualifier
> > ordering rules from ARB_shading_language_420pack.
> >
> > Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> > ---
> >  src/glsl/glsl_parser.yy | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> > index 2f2e10d..4636435 100644
> > --- a/src/glsl/glsl_parser.yy
> > +++ b/src/glsl/glsl_parser.yy
> > @@ -948,7 +948,8 @@ parameter_qualifier:
> >        if ($2.precision != ast_precision_none)
> >           _mesa_glsl_error(&@1, state, "duplicate precision qualifier");
> >
> > -      if (!state->has_420pack() && $2.flags.i != 0)
> > +      if (!(state->has_420pack() || state->is_version(420, 310)) &&
> > +          $2.flags.i != 0)
> >           _mesa_glsl_error(&@1, state, "precision qualifiers must come last");
> >
> >        $$ = $2;
> > @@ -1847,7 +1848,8 @@ type_qualifier:
> >        if ($2.precision != ast_precision_none)
> >           _mesa_glsl_error(&@1, state, "duplicate precision qualifier");
> >
> > -      if (!state->has_420pack() && $2.flags.i != 0)
> > +      if (!(state->has_420pack() || state->is_version(420, 310)) &&
> > +          $2.flags.i != 0)
> >           _mesa_glsl_error(&@1, state, "precision qualifiers must come last");
> >
> >        $$ = $2;
> > --
> > 2.5.1
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list