summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2019-03-09 10:22:39 -0600
committerJason Ekstrand <jason@jlekstrand.net>2019-03-15 01:02:19 +0000
commitef4ca44780b4c146bab799837616ec90a1000688 (patch)
tree948575d1a9f455d1249c007484368430dcb02d15
parentb315f6f82b8ae4ce64627dcae0e549f45cd320dd (diff)
compiler/types: Add a new is_interface C wrapper
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
-rw-r--r--src/compiler/nir_types.cpp6
-rw-r--r--src/compiler/nir_types.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index a1f1198f27e..31c463bda46 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -290,6 +290,12 @@ glsl_type_is_struct(const struct glsl_type *type)
}
bool
+glsl_type_is_interface(const struct glsl_type *type)
+{
+ return type->is_interface();
+}
+
+bool
glsl_type_is_struct_or_ifc(const struct glsl_type *type)
{
return type->is_struct() || type->is_interface();
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index c7ded19afb1..0c4bd4d1dbb 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -145,6 +145,7 @@ bool glsl_type_is_array(const struct glsl_type *type);
bool glsl_type_is_array_of_arrays(const struct glsl_type *type);
bool glsl_type_is_array_or_matrix(const struct glsl_type *type);
bool glsl_type_is_struct(const struct glsl_type *type);
+bool glsl_type_is_interface(const struct glsl_type *type);
bool glsl_type_is_struct_or_ifc(const struct glsl_type *type);
bool glsl_type_is_sampler(const struct glsl_type *type);
bool glsl_type_is_image(const struct glsl_type *type);