aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-06 08:46:34 +0200
committermarha <marha@users.sourceforge.net>2011-10-06 08:46:34 +0200
commitb520df571e0a319eae5231d09f36b98f28b8914a (patch)
tree0c767ea54b17a7574e8650597336a1424401dffe /mesalib/src/glsl/ast_to_hir.cpp
parentf7025b4baa1ba35ee796785641f04eac5bedb0a6 (diff)
downloadvcxsrv-b520df571e0a319eae5231d09f36b98f28b8914a.tar.gz
vcxsrv-b520df571e0a319eae5231d09f36b98f28b8914a.tar.bz2
vcxsrv-b520df571e0a319eae5231d09f36b98f28b8914a.zip
upgraded to inputproto-2.1.99.1
xwininfo fontconfig libXau mesa xkeyboard-config git update 6 oct 2011
Diffstat (limited to 'mesalib/src/glsl/ast_to_hir.cpp')
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp
index 91a223160..4f8a5482b 100644
--- a/mesalib/src/glsl/ast_to_hir.cpp
+++ b/mesalib/src/glsl/ast_to_hir.cpp
@@ -2803,6 +2803,19 @@ ast_declarator_list::hir(exec_list *instructions,
_mesa_glsl_error(& loc, state,
"identifier `%s' uses reserved `gl_' prefix",
decl->identifier);
+ else if (state->language_version >= 130 &&
+ strstr(decl->identifier, "__")) {
+ /* From page 14 (page 20 of the PDF) of the GLSL 1.10
+ * spec:
+ *
+ * "In addition, all identifiers containing two
+ * consecutive underscores (__) are reserved as
+ * possible future keywords."
+ */
+ _mesa_glsl_error(& loc, state,
+ "identifier `%s' uses reserved `__' string",
+ decl->identifier);
+ }
/* Add the variable to the symbol table. Note that the initializer's
* IR was already processed earlier (though it hasn't been emitted