summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.ypp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-08-21 20:23:18 -0700
committerIan Romanick <[email protected]>2010-08-26 09:19:48 -0700
commite9c7ceed27f6811ad1cae46c93ce9bc3fb3668d8 (patch)
treee66302bca944353decf9b78291effb9cee7a4982 /src/glsl/glsl_parser.ypp
parent86ddb356e8278423ef41125be627e57e073471d1 (diff)
glsl: Use a single shared namespace in the symbol table.
As of 1.20, variable names, function names, and structure type names all share a single namespace, and should conflict with one another in the same scope, or hide each other in nested scopes. However, in 1.10, variables and functions can share the same name in the same scope. Structure types, however, conflict with/hide both. Fixes piglit tests redeclaration-06.vert, redeclaration-11.vert, redeclaration-19.vert, and struct-05.vert.
Diffstat (limited to 'src/glsl/glsl_parser.ypp')
-rw-r--r--src/glsl/glsl_parser.ypp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser.ypp b/src/glsl/glsl_parser.ypp
index e0b1d285046..4b6d9fe7eaa 100644
--- a/src/glsl/glsl_parser.ypp
+++ b/src/glsl/glsl_parser.ypp
@@ -216,6 +216,7 @@ version_statement:
/* blank - no #version specified */
{
state->language_version = 110;
+ state->symbols->language_version = 110;
}
| VERSION INTCONSTANT EOL
{
@@ -225,6 +226,7 @@ version_statement:
case 130:
/* FINISHME: Check against implementation support versions. */
state->language_version = $2;
+ state->symbols->language_version = $2;
break;
default:
_mesa_glsl_error(& @2, state, "Shading language version"