diff options
author | Paul Berry <[email protected]> | 2012-08-02 11:17:30 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-12-06 12:13:22 -0800 |
commit | 2b4aeddfb3cdae95d69e7f46eac87514f372f531 (patch) | |
tree | cb5a3d84c80f18014fb6a0384b25afac078cf5da /src/glsl/glsl_parser.yy | |
parent | 629b9edc99a0b662cf907b9e068be2fd6ac5ae26 (diff) |
glsl/parser: Handle "#version 300 es" directive.
Note that GLSL 1.00 is selected using "#version 100", so "#version 100
es" is prohibited.
v2: Check for GLES3 before allowing '#version 300 es'
v3: Make sure a correct language_version is set in
_mesa_glsl_parse_state::process_version_directive.
Signed-off-by: Paul Berry <[email protected]>
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Acked-by: Carl Worth <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r-- | src/glsl/glsl_parser.yy | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index b15e1d1f548..d938765d750 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -261,8 +261,12 @@ version_statement: /* blank - no #version specified: defaults are already set */ | VERSION_TOK INTCONSTANT EOL { - state->process_version_directive(&@2, $2); + state->process_version_directive(&@2, $2, NULL); } + | VERSION_TOK INTCONSTANT any_identifier EOL + { + state->process_version_directive(&@2, $2, $3); + } ; pragma_statement: |