[Mesa-dev] [PATCH 11/19] glsl: Don't allow invalid identifiers as struct names.

Paul Berry stereotype441 at gmail.com
Wed Oct 2 17:45:24 PDT 2013


Fixes piglit test
spec/glsl-1.10/compiler/struct/struct-name-uses-gl-prefix.vert.
---
 src/glsl/ast_to_hir.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index bb14fc9..8fb7f2f 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -4575,6 +4575,8 @@ ast_struct_specifier::hir(exec_list *instructions,
                                                false,
                                                false /* allow_reserved_names */);
 
+   check_valid_identifier(this->name, loc, state);
+
    const glsl_type *t =
       glsl_type::get_record_instance(fields, decl_count, this->name);
 
-- 
1.8.4



More information about the mesa-dev mailing list