diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index c7d07415cd2..9b4f9c5b0aa 100644 --- a/src/compiler/nir_types.cpp +++ b/src/compiler/nir_types.cpp @@ -860,6 +860,12 @@ glsl_get_explicit_size(const struct glsl_type *type, bool align_to_stride) return type->explicit_size(align_to_stride); } +bool +glsl_type_is_packed(const struct glsl_type *type) +{ + return type->packed; +} + bool glsl_type_is_leaf(const struct glsl_type *type) { diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h index 8d82f492e02..2df1e2c8b9b 100644 --- a/src/compiler/nir_types.h +++ b/src/compiler/nir_types.h @@ -129,6 +129,7 @@ glsl_get_bit_size(const struct glsl_type *type) return glsl_base_type_get_bit_size(glsl_get_base_type(type)); } +bool glsl_type_is_packed(const struct glsl_type *type); bool glsl_type_is_16bit(const struct glsl_type *type); bool glsl_type_is_32bit(const struct glsl_type *type); bool glsl_type_is_64bit(const struct glsl_type *type);