glsl: Simplify symbol table version checking.

Previously, we stored the GLSL language version in the
glsl_symbol_table struct.  But this was unnecessary--all
glsl_symbol_table needs to know is whether functions and variables
have separate namespaces (they do in GLSL 1.10 only).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Carl Worth <cworth@cworth.org>
This commit is contained in:
Paul Berry
2012-08-01 17:44:02 -07:00
committed by Ian Romanick
parent 9a93ba3068
commit 53e572f15c
5 changed files with 9 additions and 7 deletions

View File

@@ -324,7 +324,8 @@ match_function_by_name(const char *name,
goto done; /* no match */
/* Is the function hidden by a variable (impossible in 1.10)? */
if (state->language_version != 110 && state->symbols->get_variable(name))
if (!state->symbols->separate_function_namespace
&& state->symbols->get_variable(name))
goto done; /* no match */
if (f != NULL) {