diff options
author | Kenneth Graunke <[email protected]> | 2010-09-05 00:31:28 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-09-07 17:30:37 -0700 |
commit | 814c89abdbcd5b841b98746af921796df0362238 (patch) | |
tree | 7286d59bd66ed267037896bada25190ceedc26c2 /src/glsl/ast_to_hir.cpp | |
parent | 4a867be14378587574b3082071e9fff962d28d12 (diff) |
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/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 78284034f0e..b9590871249 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -62,6 +62,8 @@ _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) _mesa_glsl_initialize_variables(instructions, state); _mesa_glsl_initialize_functions(instructions, state); + state->symbols->language_version = state->language_version; + state->current_function = NULL; /* Section 4.2 of the GLSL 1.20 specification states: |