summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-08-13 09:15:01 -0700
committerIan Romanick <[email protected]>2013-08-19 16:39:04 -0700
commitd9bb8b7b56ce65bbf6909419aa6d3d69ccd34c08 (patch)
treed94bb913b1d513a866f25ac551b3f5cfb1e1ebd3 /src/glsl/glsl_parser_extras.h
parent5fb1dd51f3845985b9389987a1c6337e7fafeabc (diff)
glsl: Disallow embedded structure definitions
Continue to allow them in GLSL 1.10 because the spec allows it. Generate an error in all other versions because the specs specifically disallow it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "9.2" <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r--src/glsl/glsl_parser_extras.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index b9ca4e3a4d6..440c15bb801 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -159,6 +159,13 @@ struct _mesa_glsl_parse_state {
enum _mesa_glsl_parser_targets target;
/**
+ * Number of nested struct_specifier levels
+ *
+ * Outside a struct_specifer, this is zero.
+ */
+ unsigned struct_specifier_depth;
+
+ /**
* Default uniform layout qualifiers tracked during parsing.
* Currently affects uniform blocks and uniform buffer variables in
* those blocks.