summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-09-05 00:31:28 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-09-07 17:30:37 -0700
commit814c89abdbcd5b841b98746af921796df0362238 (patch)
tree7286d59bd66ed267037896bada25190ceedc26c2 /src/glsl/glsl_parser_extras.cpp
parent4a867be14378587574b3082071e9fff962d28d12 (diff)
downloadexternal_mesa3d-814c89abdbcd5b841b98746af921796df0362238.zip
external_mesa3d-814c89abdbcd5b841b98746af921796df0362238.tar.gz
external_mesa3d-814c89abdbcd5b841b98746af921796df0362238.tar.bz2
glsl: Set default language version in mesa_glsl_parse_state constructor.
This should make it easier to change the default version based on the API (say, version 1.00 for OpenGL ES). Also, synchronize the symbol table's version with the parse state's version just before doing AST-to-HIR. This way, it will be set when it matters, but the main initialization code doesn't have to care about the symbol table.
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index 390d1f0..37401dd 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -51,6 +51,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct __GLcontextRec *ctx,
this->info_log = talloc_strdup(mem_ctx, "");
this->error = false;
this->loop_or_switch_nesting = NULL;
+
+ /* Set default language version and extensions */
+ this->language_version = 110;
this->ARB_texture_rectangle_enable = true;
if (ctx != NULL) {