blob: 095966531954b8b75c3630875255a32f09d5af3e [file] [log] [blame]
James Price085093d2024-06-06 02:09:47 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 device float* prevent_dce;
5};
James Price2cc6b3c2024-06-13 20:31:41 +00006struct VertexOutput {
7 float4 pos;
8 float prevent_dce;
9};
James Price085093d2024-06-06 02:09:47 +000010struct vertex_main_outputs {
James Price2cc6b3c2024-06-13 20:31:41 +000011 float4 VertexOutput_pos [[position]];
12 float VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
James Price085093d2024-06-06 02:09:47 +000013};
dan sinclairf1f381a2023-11-22 09:44:15 +000014
James Price2cc6b3c2024-06-13 20:31:41 +000015float acos_489247() {
James Price085093d2024-06-06 02:09:47 +000016 float res = 0.25f;
James Price2cc6b3c2024-06-13 20:31:41 +000017 return res;
dan sinclairf1f381a2023-11-22 09:44:15 +000018}
James Price085093d2024-06-06 02:09:47 +000019fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
20 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
James Price2cc6b3c2024-06-13 20:31:41 +000021 (*tint_module_vars.prevent_dce) = acos_489247();
dan sinclairf1f381a2023-11-22 09:44:15 +000022}
James Price085093d2024-06-06 02:09:47 +000023kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
24 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
James Price2cc6b3c2024-06-13 20:31:41 +000025 (*tint_module_vars.prevent_dce) = acos_489247();
dan sinclairf1f381a2023-11-22 09:44:15 +000026}
James Price2cc6b3c2024-06-13 20:31:41 +000027VertexOutput vertex_main_inner() {
28 VertexOutput out = {};
29 out.pos = float4(0.0f);
30 out.prevent_dce = acos_489247();
31 return out;
32}
33vertex vertex_main_outputs vertex_main() {
34 VertexOutput const v = vertex_main_inner();
35 return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
dan sinclairf1f381a2023-11-22 09:44:15 +000036}