aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/glsl_types.h')
-rw-r--r--mesalib/src/glsl/glsl_types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/mesalib/src/glsl/glsl_types.h b/mesalib/src/glsl/glsl_types.h
index d545533dc..eeb14c274 100644
--- a/mesalib/src/glsl/glsl_types.h
+++ b/mesalib/src/glsl/glsl_types.h
@@ -279,6 +279,9 @@ struct glsl_type {
/**
* Calculate the number of unique values from glGetUniformLocation for the
* elements of the type.
+ *
+ * This is used to allocate slots in the UniformRemapTable, the amount of
+ * locations may not match with actual used storage space by the driver.
*/
unsigned uniform_locations() const;
@@ -486,6 +489,14 @@ struct glsl_type {
}
/**
+ * Query if a type is unnamed/anonymous (named by the parser)
+ */
+ bool is_anonymous() const
+ {
+ return !strncmp(name, "#anon", 5);
+ }
+
+ /**
* Get the type stripped of any arrays
*
* \return