summaryrefslogtreecommitdiff
path: root/src/compiler/nir_types.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-03-14 22:01:29 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-05-07 15:44:41 -0700
commit1896682d272c762b4dd5643a27d98b87a966b792 (patch)
tree0f7bec8b4d6f1d79510bb7f561331a83251e9723 /src/compiler/nir_types.cpp
parentb9e6e8e7d4ed9f9330aabc73e0644fe50460cf9e (diff)
compiler: Add a C wrapper for glsl_type::without_array().
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Forbes <chrisforbes@google.com>
Diffstat (limited to 'src/compiler/nir_types.cpp')
-rw-r--r--src/compiler/nir_types.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 62a1071e444..4ea7a2fcd38 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -65,6 +65,12 @@ glsl_get_array_element(const glsl_type* type)
}
const glsl_type *
+glsl_without_array(const glsl_type *type)
+{
+ return type->without_array();
+}
+
+const glsl_type *
glsl_get_struct_field(const glsl_type *type, unsigned index)
{
return type->fields.structure[index].type;