From ef4ca44780b4c146bab799837616ec90a1000688 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sat, 9 Mar 2019 10:22:39 -0600 Subject: [PATCH] compiler/types: Add a new is_interface C wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro Piñeiro Reviewed-by: Kristian H. Kristensen Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir_types.cpp | 6 ++++++ src/compiler/nir_types.h | 1 + 2 files changed, 7 insertions(+) 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 @@ -289,6 +289,12 @@ glsl_type_is_struct(const struct glsl_type *type) return type->is_struct(); } +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) { 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); -- 2.30.2