glsl: Don't allow invalid identifiers as struct names.

Fixes piglit test
spec/glsl-1.10/compiler/struct/struct-name-uses-gl-prefix.vert.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Paul Berry 2013-09-27 17:47:02 -07:00
parent 9fb6f59552
commit 78b072b2bc

View file

@ -4575,6 +4575,8 @@ ast_struct_specifier::hir(exec_list *instructions,
false,
false /* allow_reserved_names */);
validate_identifier(this->name, loc, state);
const glsl_type *t =
glsl_type::get_record_instance(fields, decl_count, this->name);