glsl: Don't allow invalid identifier names in struct/interface fields.
authorPaul Berry <stereotype441@gmail.com>
Fri, 27 Sep 2013 21:52:08 +0000 (14:52 -0700)
committerPaul Berry <stereotype441@gmail.com>
Thu, 10 Oct 2013 21:27:12 +0000 (14:27 -0700)
commit9b5b0320b65631aa53bb591681bdb730c90c99da
tree6507269a459aa105394cad1a90924b56a9c68119
parentf2dd3a04ce3bef550eca7893a1e6907cf8e43bc2
glsl: Don't allow invalid identifier names in struct/interface fields.

Note: we need to make an exception for the gl_PerVertex interface
block, since built-in variables are allowed to be redeclared inside
it.  Future patches will make redeclaration of gl_PerVertex work
properly.

Fixes piglit tests:
- spec/glsl-1.50/compiler/interface-block-array-elem-uses-gl-prefix.vert
- spec/glsl-1.50/compiler/named-interface-block-elem-uses-gl-prefix.vert
- spec/glsl-1.50/compiler/unnamed-interface-block-elem-uses-gl-prefix.vert

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/ast_to_hir.cpp