glsl: parse GLSL ES 3.00 keywords correctly.
authorPaul Berry <stereotype441@gmail.com>
Thu, 2 Aug 2012 15:17:55 +0000 (08:17 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 6 Dec 2012 20:13:21 +0000 (12:13 -0800)
commit534ec62152e70ed8f6467feaf07b2db2197e11b1
tree9f93f3e9e50823ef55c3144f42d9c4fe06191222
parent948e5dda67caa49fa9fc7cdc4649343eaf305b49
glsl: parse GLSL ES 3.00 keywords correctly.

GLSL ES 3.00 adds the following keywords over GLSL 1.00: uint,
uvec[2-4], matNxM, centroid, flat, smooth, various samplers, layout,
switch, default, and case.

Additionally, it reserves a large number of keywords, some of which
were already reserved in versions of desktop GL that Mesa supports,
some of which are new to Mesa.

A few of the reserved keywords in GLSL ES 3.00 are keywords that are
supported in all other versions of GLSL: attribute, varying,
sampler1D, sampler1DShador, sampler2DRect, and sampler2DRectShadow.

This patch updates the lexer to handle all of the new keywords
correctly when the language being parsed is GLSL 3.00 ES.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Carl Worth <cworth@cworth.org>
src/glsl/glsl_lexer.ll
src/glsl/glsl_parser.yy