mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 02:30:12 +01:00
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:
parent
9fb6f59552
commit
78b072b2bc
1 changed files with 2 additions and 0 deletions
|
|
@ -4575,6 +4575,8 @@ ast_struct_specifier::hir(exec_list *instructions,
|
||||||
false,
|
false,
|
||||||
false /* allow_reserved_names */);
|
false /* allow_reserved_names */);
|
||||||
|
|
||||||
|
validate_identifier(this->name, loc, state);
|
||||||
|
|
||||||
const glsl_type *t =
|
const glsl_type *t =
|
||||||
glsl_type::get_record_instance(fields, decl_count, this->name);
|
glsl_type::get_record_instance(fields, decl_count, this->name);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue