summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-08-01 18:36:57 -0700
committerIan Romanick <[email protected]>2012-12-06 12:13:21 -0800
commitd9bfaa104ed4debeff6c7d69daf4d9cc85cadb8d (patch)
tree0b66292a5b90fc357089ba57d7f290d3a92f2911 /src/glsl/glsl_parser.yy
parent53e572f15cb394a8d4f2cd5856dd2a06b6ccd3f0 (diff)
glsl: Make a function to express a GLSL version ir human-readable form.
This will be useful in generating more helpful error messages, especially with the addition of GLSL 3.00 ES support. [v2, idr]: Rename ctx parameter to mem_ctx 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.yy6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 407dbbeebcc..03e05ff1bf3 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -290,10 +290,8 @@ version_statement:
state->language_version = $2;
state->version_string =
- ralloc_asprintf(state, "GLSL%s %d.%02d",
- state->es_shader ? " ES" : "",
- state->language_version / 100,
- state->language_version % 100);
+ glsl_compute_version_string(state, state->es_shader,
+ state->language_version);
if (!supported) {
_mesa_glsl_error(& @2, state, "%s is not supported. "