summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir_types.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-02-11 22:03:48 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2016-02-13 17:22:36 -0800
commitf05f576803caf939a420d559c78cbf40a455235f (patch)
tree48679b067b8876de5b135605ff555d521e6420d0 /src/compiler/nir_types.cpp
parent914829f76625daf239a0c0a75c1ff648355191a3 (diff)
downloadexternal_mesa3d-f05f576803caf939a420d559c78cbf40a455235f.zip
external_mesa3d-f05f576803caf939a420d559c78cbf40a455235f.tar.gz
external_mesa3d-f05f576803caf939a420d559c78cbf40a455235f.tar.bz2
nir/types: Add a few more glsl_type_is_ functions
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src/compiler/nir_types.cpp')
-rw-r--r--src/compiler/nir_types.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 89f1be5..2942810 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -158,6 +158,12 @@ glsl_type_is_void(const glsl_type *type)
}
bool
+glsl_type_is_error(const glsl_type *type)
+{
+ return type->is_error();
+}
+
+bool
glsl_type_is_vector(const struct glsl_type *type)
{
return type->is_vector();
@@ -182,6 +188,18 @@ glsl_type_is_matrix(const struct glsl_type *type)
}
bool
+glsl_type_is_array(const struct glsl_type *type)
+{
+ return type->is_array();
+}
+
+bool
+glsl_type_is_struct(const struct glsl_type *type)
+{
+ return type->is_record() || type->is_interface();
+}
+
+bool
glsl_type_is_sampler(const struct glsl_type *type)
{
return type->is_sampler();