diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2011-01-06 10:49:56 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2011-01-06 10:49:56 -0800 |
commit | 86b4398cd158024f6be9fa830554a11c2a7ebe0c (patch) | |
tree | f6a68f1bbcf218cbfefe30742054fd0002c99711 /src/glsl/glsl_lexer.lpp | |
parent | e942f328365309a1d8240cfe8eb5d88391015f37 (diff) |
glsl: Support the 'invariant(all)' pragma
Previously the 'STDGL invariant(all)' pragma added in GLSL 1.20 was
simply ignored by the compiler. This adds support for setting all
variable invariant.
In GLSL 1.10 and GLSL ES 1.00 the pragma is ignored, per the specs,
but a warning is generated.
Fixes piglit test glsl-invariant-pragma and bugzilla #31925.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Diffstat (limited to 'src/glsl/glsl_lexer.lpp')
-rw-r--r-- | src/glsl/glsl_lexer.lpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/glsl_lexer.lpp b/src/glsl/glsl_lexer.lpp index 15742ac363..d30759be2b 100644 --- a/src/glsl/glsl_lexer.lpp +++ b/src/glsl/glsl_lexer.lpp @@ -145,6 +145,10 @@ HASH ^{SPC}#{SPC} BEGIN PP; return PRAGMA_OPTIMIZE_OFF; } +^{SPC}#{SPC}pragma{SPCP}STDGL{SPCP}invariant{SPC}\({SPC}all{SPC}\) { + BEGIN PP; + return PRAGMA_INVARIANT_ALL; + } ^{SPC}#{SPC}pragma{SPCP} { BEGIN PRAGMA; } <PRAGMA>\n { BEGIN 0; yylineno++; yycolumn = 0; } |