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.
This commit is contained in:
Kenneth Graunke
2010-09-05 00:31:28 -07:00
parent 4a867be143
commit 814c89abdb
4 changed files with 249 additions and 260 deletions

View File

@@ -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) {