summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2013-07-15 22:20:03 -0700
committerKenneth Graunke <kenneth@whitecape.org>2013-07-18 16:57:23 -0700
commit0418846a07b02d39e129987580e7ea50fb422ee0 (patch)
treed55b179c77f58bfd17addbbaf3015d4d78213329 /src/glsl/ast.h
parent7f6a2d6937e837e06d9e22d173d996397ff4cacf (diff)
downloadexternal_mesa3d-0418846a07b02d39e129987580e7ea50fb422ee0.zip
external_mesa3d-0418846a07b02d39e129987580e7ea50fb422ee0.tar.gz
external_mesa3d-0418846a07b02d39e129987580e7ea50fb422ee0.tar.bz2
glsl: Parse the "binding" keyword and store it in ast_type_qualifier.
Nothing actually uses this yet. v2: Remove >= 0 checks. They'll be handled in later validation. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r--src/glsl/ast.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 6aede00..d98f1a3 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -413,6 +413,12 @@ struct ast_type_qualifier {
*/
unsigned explicit_index:1;
+ /**
+ * Flag set if GL_ARB_shading_language_420pack "binding" layout
+ * qualifier is used.
+ */
+ unsigned explicit_binding:1;
+
/** \name Layout qualifiers for GL_AMD_conservative_depth */
/** \{ */
unsigned depth_any:1;
@@ -456,6 +462,14 @@ struct ast_type_qualifier {
int index;
/**
+ * Binding specified via GL_ARB_shading_language_420pack's "binding" keyword.
+ *
+ * \note
+ * This field is only valid if \c explicit_binding is set.
+ */
+ int binding;
+
+ /**
* Return true if and only if an interpolation qualifier is present.
*/
bool has_interpolation() const;