Mesa (master): glsl: Don't allow invalid identifiers as struct names.
Paul Berry
stereotype441 at kemper.freedesktop.org
Thu Oct 10 21:46:57 UTC 2013
Module: Mesa
Branch: master
Commit: 78b072b2bcbd9e730b7a6e09d85c85b44bdd64da
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=78b072b2bcbd9e730b7a6e09d85c85b44bdd64da
Author: Paul Berry <stereotype441 at gmail.com>
Date: Fri Sep 27 17:47:02 2013 -0700
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 at whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/ast_to_hir.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 1a5df71..c7c0a0e 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 */);
+ validate_identifier(this->name, loc, state);
+
const glsl_type *t =
glsl_type::get_record_instance(fields, decl_count, this->name);
More information about the mesa-commit
mailing list