blob: 5757e9403e9e221d2bbc0fea4e1ba6ecb23697ed [file] [log] [blame]
James Price085093d2024-06-06 02:09:47 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 device float2* 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 acos_dfc915(tint_module_vars_struct tint_module_vars) {
11 float2 res = float2(0.25f);
12 (*tint_module_vars.prevent_dce) = res;
dan sinclairf1f381a2023-11-22 09:44:15 +000013}
James Price085093d2024-06-06 02:09:47 +000014float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
15 acos_dfc915(tint_module_vars);
16 return float4(0.0f);
dan sinclairf1f381a2023-11-22 09:44:15 +000017}
James Price085093d2024-06-06 02:09:47 +000018fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
19 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
20 acos_dfc915(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000021}
James Price085093d2024-06-06 02:09:47 +000022kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
23 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
24 acos_dfc915(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000025}
James Price085093d2024-06-06 02:09:47 +000026vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
27 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
28 return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
dan sinclairf1f381a2023-11-22 09:44:15 +000029}