blob: da4097d378c1468272f1caacd2358939f9d61481 [file] [log] [blame]
James Price085093d2024-06-06 02:09:47 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 device int4* prevent_dce;
5};
6struct vertex_main_outputs {
7 float4 tint_symbol [[position]];
8};
dan sinclairf1f381a2023-11-22 09:44:15 +00009
James Price085093d2024-06-06 02:09:47 +000010void countTrailingZeros_1dc84a(tint_module_vars_struct tint_module_vars) {
11 int4 arg_0 = int4(1);
12 int4 res = ctz(arg_0);
13 (*tint_module_vars.prevent_dce) = res;
dan sinclairf1f381a2023-11-22 09:44:15 +000014}
James Price085093d2024-06-06 02:09:47 +000015float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
16 countTrailingZeros_1dc84a(tint_module_vars);
17 return float4(0.0f);
dan sinclairf1f381a2023-11-22 09:44:15 +000018}
James Price085093d2024-06-06 02:09:47 +000019fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
20 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
21 countTrailingZeros_1dc84a(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000022}
James Price085093d2024-06-06 02:09:47 +000023kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
24 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
25 countTrailingZeros_1dc84a(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000026}
James Price085093d2024-06-06 02:09:47 +000027vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
28 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
29 return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
dan sinclairf1f381a2023-11-22 09:44:15 +000030}