compiler/types: Add a struct_type_is_packed wrapper

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6065>
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 70ae117..a53b14d 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -361,6 +361,13 @@
 }
 
 bool
+glsl_struct_type_is_packed(const struct glsl_type *type)
+{
+   assert(glsl_type_is_struct(type));
+   return type->packed;
+}
+
+bool
 glsl_type_is_dual_slot(const struct glsl_type *type)
 {
    return type->is_dual_slot();
diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
index eeddcf2..6118e52 100644
--- a/src/compiler/nir_types.h
+++ b/src/compiler/nir_types.h
@@ -152,6 +152,7 @@
 bool glsl_type_contains_64bit(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);
+bool glsl_struct_type_is_packed(const struct glsl_type *type);
 bool glsl_contains_atomic(const struct glsl_type *type);
 bool glsl_contains_opaque(const struct glsl_type *type);