[Mesa-dev] [PATCH] glcpp: Reject token pasting operator in GLES

Ian Romanick idr at freedesktop.org
Wed Nov 28 14:12:50 PST 2012


On 11/28/2012 11:21 AM, Matt Turner wrote:
> The GLSL ES 3.0 spec (Section 12.17) says:
> "GLSL ES 1.00 removed token pasting and other functionality."

Do we have piglit tests?  'make check' tests?  I assume this passes the 
GLES3 conformance test without regressing anything.

This should be marked for stable branches.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> ---
>   src/glsl/glcpp/glcpp-lex.l |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
> index fd28711..a029f62 100644
> --- a/src/glsl/glcpp/glcpp-lex.l
> +++ b/src/glsl/glcpp/glcpp-lex.l
> @@ -260,6 +260,8 @@ HEXADECIMAL_INTEGER	0[xX][0-9a-fA-F]+[uU]?
>   }
>
>   "##" {
> +	if (parser->is_gles)
> +		glcpp_error(yylloc, yyextra, "Token pasting (##) is illegal in GLES");
>   	return PASTE;
>   }
>
>



More information about the mesa-dev mailing list