blob: 5d03e130e4eb0e4d25a88644eb3881b387b527ed [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
device packed_float3* prevent_dce;
};
float3 subgroupInclusiveAdd_b787ce() {
float3 res = simd_prefix_inclusive_sum(float3(1.0f));
return res;
}
fragment void fragment_main(device packed_float3* prevent_dce [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
(*tint_module_vars.prevent_dce) = packed_float3(subgroupInclusiveAdd_b787ce());
}
kernel void compute_main(device packed_float3* prevent_dce [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
(*tint_module_vars.prevent_dce) = packed_float3(subgroupInclusiveAdd_b787ce());
}