Mesa (master): glsl: Use a single shared namespace in the symbol table.

Ian Romanick idr at kemper.freedesktop.org
Thu Aug 26 16:25:17 UTC 2010


Module: Mesa
Branch: master
Commit: e9c7ceed27f6811ad1cae46c93ce9bc3fb3668d8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9c7ceed27f6811ad1cae46c93ce9bc3fb3668d8

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat Aug 21 20:23:18 2010 -0700

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.

---

 src/glsl/Makefile                            |    1 +
 src/glsl/ast_to_hir.cpp                      |   12 +-
 src/glsl/builtin_function.cpp                |    1 +
 src/glsl/builtins/tools/generate_builtins.py |    1 +
 src/glsl/glsl_parser.cpp                     |  972 +++++++++++++-------------
 src/glsl/glsl_parser.h                       |   13 +-
 src/glsl/glsl_parser.ypp                     |    2 +
 src/glsl/glsl_symbol_table.cpp               |  160 +++++
 src/glsl/glsl_symbol_table.h                 |   85 +--
 src/glsl/glsl_types.cpp                      |   11 +-
 src/glsl/glsl_types.h                        |    4 +-
 11 files changed, 686 insertions(+), 576 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=e9c7ceed27f6811ad1cae46c93ce9bc3fb3668d8



More information about the mesa-commit mailing list