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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user