diff options
author | Connor Abbott <[email protected]> | 2015-07-15 21:58:32 -0700 |
---|---|---|
committer | Connor Abbott <[email protected]> | 2015-07-15 21:58:32 -0700 |
commit | 513ee7fa48bb2fb2ed1f07b6f18ebff402c882f2 (patch) | |
tree | bf8ef915f41abfe1d3234ae1a5cb081351fd8f20 | |
parent | 9fa0989ff2266315d7dc8469dab601ebc2289fea (diff) |
nir/types: add more nir_type_is_xxx() wrappers
-rw-r--r-- | src/glsl/nir/nir_types.cpp | 12 | ||||
-rw-r--r-- | src/glsl/nir/nir_types.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_types.cpp b/src/glsl/nir/nir_types.cpp index 3c00bdb3c18..f3f3af97fde 100644 --- a/src/glsl/nir/nir_types.cpp +++ b/src/glsl/nir/nir_types.cpp @@ -169,6 +169,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(); diff --git a/src/glsl/nir/nir_types.h b/src/glsl/nir/nir_types.h index 60e1d9d96fc..a2fa7934e16 100644 --- a/src/glsl/nir/nir_types.h +++ b/src/glsl/nir/nir_types.h @@ -76,6 +76,8 @@ bool glsl_type_is_vector(const struct glsl_type *type); bool glsl_type_is_scalar(const struct glsl_type *type); bool glsl_type_is_vector_or_scalar(const struct glsl_type *type); bool glsl_type_is_matrix(const struct glsl_type *type); +bool glsl_type_is_array(const struct glsl_type *type); +bool glsl_type_is_struct(const struct glsl_type *type); bool glsl_type_is_sampler(const struct glsl_type *type); bool glsl_sampler_type_is_shadow(const struct glsl_type *type); bool glsl_sampler_type_is_array(const struct glsl_type *type); |