aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2010-08-16 14:02:25 -0700
committerKenneth Graunke <[email protected]>2010-09-07 17:30:38 -0700
commitc98deb18d5836f75cf62562f9304e4d90e0ea920 (patch)
tree5d2bc806e36eb65c80d070c85c1f6c49b646f1ab /src/glsl
parentd8e34e29eb58c38ef60226156aab8f4a93b397b7 (diff)
ast_to_hir: Reject embedded structure definitions in GLSL ES 1.00.
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ast_to_hir.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index e767c58e097..9e639efd0ab 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2715,6 +2715,15 @@ ast_struct_specifier::hir(exec_list *instructions,
decl_list->type->specifier->hir(instructions, state);
+ /* Section 10.9 of the GLSL ES 1.00 specification states that
+ * embedded structure definitions have been removed from the language.
+ */
+ if (state->es_shader && decl_list->type->specifier->structure != NULL) {
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(&loc, state, "Embedded structure definitions are "
+ "not allowed in GLSL ES 1.00.");
+ }
+
const glsl_type *decl_type =
decl_list->type->specifier->glsl_type(& type_name, state);