aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser.ypp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-12 20:56:18 +0000
committermarha <marha@users.sourceforge.net>2011-01-12 20:56:18 +0000
commitca14143b18b939ee4506936e77478f8c593802b5 (patch)
tree83cf183c0a8814b67d664d002611da95bc78a98f /mesalib/src/glsl/glsl_parser.ypp
parent0f84d9e7c6d9556e3b00adc5db3235c9291eeaa1 (diff)
parent2ebdcfeee38bed8c65daa78aa7d18d8d1d93ed85 (diff)
downloadvcxsrv-ca14143b18b939ee4506936e77478f8c593802b5.tar.gz
vcxsrv-ca14143b18b939ee4506936e77478f8c593802b5.tar.bz2
vcxsrv-ca14143b18b939ee4506936e77478f8c593802b5.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/glsl/glsl_parser.ypp')
-rw-r--r--mesalib/src/glsl/glsl_parser.ypp27
1 files changed, 13 insertions, 14 deletions
diff --git a/mesalib/src/glsl/glsl_parser.ypp b/mesalib/src/glsl/glsl_parser.ypp
index e0c5fc1c7..37fff5186 100644
--- a/mesalib/src/glsl/glsl_parser.ypp
+++ b/mesalib/src/glsl/glsl_parser.ypp
@@ -228,6 +228,11 @@ version_statement:
case 130:
/* FINISHME: Check against implementation support versions. */
state->language_version = $2;
+ state->version_string =
+ talloc_asprintf(state, "GLSL%s %d.%02d",
+ state->es_shader ? " ES" : "",
+ state->language_version / 100,
+ state->language_version % 100);
break;
default:
_mesa_glsl_error(& @2, state, "Shading language version"
@@ -246,11 +251,8 @@ pragma_statement:
{
if (state->language_version < 120) {
_mesa_glsl_warning(& @1, state,
- "pragma `invariant(all)' not supported in "
- "GLSL%s %d.%02d",
- state->es_shader ? " ES" : "",
- state->language_version / 100,
- state->language_version % 100);
+ "pragma `invariant(all)' not supported in %s",
+ state->version_string);
} else {
state->all_invariant = true;
}
@@ -1296,10 +1298,9 @@ precision_qualifier:
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& @1, state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
$$ = ast_precision_high;
}
@@ -1307,10 +1308,9 @@ precision_qualifier:
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& @1, state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
$$ = ast_precision_medium;
}
@@ -1318,10 +1318,9 @@ precision_qualifier:
if (!state->es_shader && state->language_version < 130)
_mesa_glsl_error(& @1, state,
"precision qualifier forbidden "
- "in GLSL %d.%d (1.30 or later "
+ "in %s (1.30 or later "
"required)\n",
- state->language_version / 100,
- state->language_version % 100);
+ state->version_string);
$$ = ast_precision_low;
}