blob: c164eb7155325a51acac83bd0401d3a7de36830e [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct Inner {
half scalar_f16;
half3 vec3_f16;
half2x4 mat2x4_f16;
};
struct S {
Inner inner;
};
struct tint_module_vars_struct {
const device S* in;
device S* out;
};
void tint_store_and_preserve_padding(device Inner* const target, Inner value_param) {
(*target).scalar_f16 = value_param.scalar_f16;
(*target).vec3_f16 = value_param.vec3_f16;
(*target).mat2x4_f16 = value_param.mat2x4_f16;
}
void tint_store_and_preserve_padding(device S* const target, S value_param) {
tint_store_and_preserve_padding((&(*target).inner), value_param.inner);
}
kernel void tint_symbol(const device S* in [[buffer(0)]], device S* out [[buffer(1)]]) {
tint_module_vars_struct const tint_module_vars = {.in=in, .out=out};
S const t = (*tint_module_vars.in);
tint_store_and_preserve_padding(tint_module_vars.out, t);
}