summaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_types.h
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2014-06-05 07:37:16 +0300
committerTapani Pälli <tapani.palli@intel.com>2014-06-16 06:49:59 +0300
commitdadc3d04f034327b4afeeadf9a860e1b620fab37 (patch)
treeb1947bb1840d456474a8f56bc82f8d6a315b6644 /src/glsl/glsl_types.h
parentbfe42ddd99e8702e2daf14238966069fd25b6d0e (diff)
downloadexternal_mesa3d-dadc3d04f034327b4afeeadf9a860e1b620fab37.zip
external_mesa3d-dadc3d04f034327b4afeeadf9a860e1b620fab37.tar.gz
external_mesa3d-dadc3d04f034327b4afeeadf9a860e1b620fab37.tar.bz2
glsl: add glsl_type::uniform_locations() helper function
This function calculates the number of unique values from glGetUniformLocation for the elements of the type. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/glsl_types.h')
-rw-r--r--src/glsl/glsl_types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index 35a4e6a..f6d4a02 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -256,6 +256,12 @@ struct glsl_type {
unsigned component_slots() const;
/**
+ * Calculate the number of unique values from glGetUniformLocation for the
+ * elements of the type.
+ */
+ unsigned uniform_locations() const;
+
+ /**
* Calculate the number of attribute slots required to hold this type
*
* This implements the language rules of GLSL 1.50 for counting the number