+static void
+struct_packed_decoration_cb(struct vtn_builder *b,
+ struct vtn_value *val, int member,
+ const struct vtn_decoration *dec, void *void_ctx)
+{
+ vtn_assert(val->type->base_type == vtn_base_type_struct);
+ if (dec->decoration == SpvDecorationCPacked) {
+ if (b->shader->info.stage != MESA_SHADER_KERNEL) {
+ vtn_warn("Decoration only allowed for CL-style kernels: %s",
+ spirv_decoration_to_string(dec->decoration));
+ }
+ val->type->packed = true;
+ }
+}
+