This should help code calculating field offsets to get it right when
the structure is marked packed.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6472>
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)
{
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);