aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorAntia Puentes <[email protected]>2018-11-15 09:13:08 +0100
committerAlejandro PiƱeiro <[email protected]>2019-07-12 23:42:41 +0200
commitcafc1a40d465a42805bb2ae45b18997e87bbac75 (patch)
tree1e66d39c6b2d3e8e02445e92a684e914d892ac70 /src/compiler
parentbfc5e467467e2accb5f9877e3dbaca35825846ca (diff)
nir/types: Add glsl_type_is_unsized_array helper
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler')
-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 3b6362e66fa..15c752676f4 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -280,6 +280,12 @@ glsl_type_is_array(const struct glsl_type *type)
}
bool
+glsl_type_is_unsized_array(const struct glsl_type *type)
+{
+ return type->is_unsized_array();
+}
+
+bool
glsl_type_is_array_of_arrays(const struct glsl_type *type)
{
return type->is_array_of_arrays();
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index 9efe4b4770c..7b2512792b8 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -121,6 +121,7 @@ bool glsl_type_is_vector_or_scalar(const struct glsl_type *type);
bool glsl_type_is_matrix(const struct glsl_type *type);
bool glsl_matrix_type_is_row_major(const struct glsl_type *type);
bool glsl_type_is_array(const struct glsl_type *type);
+bool glsl_type_is_unsized_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);