blob: 6ede2a0e056d14470d431f044558c03eae911aae [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct Inner {
float scalar_f32;
float3 vec3_f32;
float2x4 mat2x4_f32;
};
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_f32 = value_param.scalar_f32;
(*target).vec3_f32 = value_param.vec3_f32;
(*target).mat2x4_f32 = value_param.mat2x4_f32;
}
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 = tint_module_vars_struct{.in=in, .out=out};
S const t = (*tint_module_vars.in);
tint_store_and_preserve_padding(tint_module_vars.out, t);
}