summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-08-01 14:50:05 -0700
committerIan Romanick <[email protected]>2012-12-06 12:13:21 -0800
commite3ded7fe628d5a842f2fae0da355a4034cff27cf (patch)
tree9f844ea688b37f3a564609d9331fe6440960b471 /src/glsl/glsl_parser.yy
parent5d0fd3270f028cd93efa5301c998be034826a102 (diff)
glsl: Make use of new _mesa_glsl_parse_state::is_version() function.
Reviewed-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.yy5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index e68a601c89e..3b4d84b6e6d 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -310,9 +310,10 @@ pragma_statement:
| PRAGMA_OPTIMIZE_OFF EOL
| PRAGMA_INVARIANT_ALL EOL
{
- if (state->language_version == 110) {
+ if (!state->is_version(120, 100)) {
_mesa_glsl_warning(& @1, state,
- "pragma `invariant(all)' not supported in %s",
+ "pragma `invariant(all)' not supported in %s "
+ "(GLSL ES 1.00 or GLSL 1.20 required).",
state->get_version_string());
} else {
state->all_invariant = true;