On Mon, 2015-08-10 at 13:04 +0200, Marta Lofstedt wrote: > From: Marta Lofstedt <marta.lofst...@intel.com> > > GL_ARB_compute_shader is limited for GLSL version 430. > This enables for GLSL ES version 310. > > V2: Updated error string to also include GLSL 3.10 > > Signed-off-by: Marta Lofstedt <marta.lofst...@linux.intel.com> > --- > src/glsl/glsl_parser.yy | 5 ++--- > src/glsl/glsl_parser_extras.h | 5 +++++ > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy > index 2b0c8bd..2abdab4 100644 > --- a/src/glsl/glsl_parser.yy > +++ b/src/glsl/glsl_parser.yy > @@ -1519,11 +1519,10 @@ layout_qualifier_id: > "invalid %s of %d specified", > local_size_qualifiers[i], $3); > YYERROR; > - } else if (!state->is_version(430, 0) && > - !state->ARB_compute_shader_enable) { > + } else if (!state->has_compute_shader_()) { > _mesa_glsl_error(& @3, state, > "%s qualifier requires GLSL 4.30 or " > - "ARB_compute_shader", > + "GLSL ES 3.10 or ARB_compute_shader",
You have tabs in the above line. Also see the AoA example for a way to make the message a little nicer: http://lists.freedesktop.org/archives/mesa-dev/2015-July/090104.html > local_size_qualifiers[i]); > YYERROR; > } else { > diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h > index eb325f0..57a7555 100644 > --- a/src/glsl/glsl_parser_extras.h > +++ b/src/glsl/glsl_parser_extras.h > @@ -236,6 +236,11 @@ struct _mesa_glsl_parse_state { > return ARB_shading_language_420pack_enable || is_version(420, 0); > } > > + bool has_compute_shader() const > + { > + return ARB_compute_shader_enable || is_version(430, 310); > + } > + > void process_version_directive(YYLTYPE *locp, int version, > const char *ident); > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev