blob: f8b55b9fb95ed56fc171206c8009b51a8dddd071 [file] [log] [blame]
James Price085093d2024-06-06 02:09:47 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 device int* 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 any_0e3e58(tint_module_vars_struct tint_module_vars) {
11 bool2 arg_0 = bool2(true);
12 bool res = any(arg_0);
13 (*tint_module_vars.prevent_dce) = select(0, 1, all(!(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 any_0e3e58(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 int* prevent_dce [[buffer(0)]]) {
20 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
21 any_0e3e58(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000022}
James Price085093d2024-06-06 02:09:47 +000023kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
24 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
25 any_0e3e58(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 int* 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}