From cafc1a40d465a42805bb2ae45b18997e87bbac75 Mon Sep 17 00:00:00 2001 From: Antia Puentes Date: Thu, 15 Nov 2018 09:13:08 +0100 Subject: nir/types: Add glsl_type_is_unsized_array helper Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir_types.cpp | 6 ++++++ src/compiler/nir_types.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src/compiler') 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 @@ -279,6 +279,12 @@ glsl_type_is_array(const struct glsl_type *type) return type->is_array(); } +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) { 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); -- cgit v1.2.3