[Mesa-dev] [PATCH 08/11] glsl: GLSL ES identifiers cannot exceed 1024 characters

Erik Faye-Lund kusmabite at gmail.com
Mon Jan 19 04:41:47 PST 2015


On Mon, Jan 19, 2015 at 12:32 PM, Eduardo Lima Mitev <elima at igalia.com> wrote:
> From: Iago Toral Quiroga <itoral at igalia.com>
>
> Fixes the following 2 dEQP tests:
> dEQP-GLES3.functional.shaders.keywords.invalid_identifiers.max_length_vertex
> dEQP-GLES3.functional.shaders.keywords.invalid_identifiers.max_length_fragment
> ---
>  src/glsl/glsl_parser.yy | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index 7fb8c38..165419c 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -362,6 +362,13 @@ any_identifier:
>     IDENTIFIER
>     | TYPE_IDENTIFIER
>     | NEW_IDENTIFIER
> +   {
> +      if (state->es_shader && strlen($1) > 1024) {
> +         _mesa_glsl_error(& @1, state,
> +                          "Identifier `%s' exceeds "
> +                          "1024 characters", $1);
> +      }
> +   }

The limit of 1024 characters for identifiers is only specified for
OpenGL ES Shading Language versions 3.00 and up, not for version 1.00
as OpenGL ES 2.0 uses. Perhaps a spec bug?


More information about the mesa-dev mailing list