blob: 3c948d6fac59f9b5ffd55a3a7c5056c79ec7b673 [file] [log] [blame]
dan sinclairb4697b762023-11-24 09:42:19 +00001#include <metal_stdlib>
2using namespace metal;
James Price48be7e82024-06-19 22:38:07 +00003
dan sinclairb4697b762023-11-24 09:42:19 +00004struct modf_result_vec3_f32 {
5 float3 fract;
6 float3 whole;
7};
James Price48be7e82024-06-19 22:38:07 +00008
James Price2cc6b3c2024-06-13 20:31:41 +00009struct VertexOutput {
10 float4 pos;
11};
James Price48be7e82024-06-19 22:38:07 +000012
James Price02cf9112024-05-29 14:43:19 +000013struct vertex_main_outputs {
James Price2cc6b3c2024-06-13 20:31:41 +000014 float4 VertexOutput_pos [[position]];
James Price02cf9112024-05-29 14:43:19 +000015};
dan sinclairf1f381a2023-11-22 09:44:15 +000016
dan sinclairb4697b762023-11-24 09:42:19 +000017void modf_68d8ee() {
18 modf_result_vec3_f32 res = modf_result_vec3_f32{.fract=float3(-0.5f), .whole=float3(-1.0f)};
19}
James Price48be7e82024-06-19 22:38:07 +000020
dan sinclairb4697b762023-11-24 09:42:19 +000021fragment void fragment_main() {
22 modf_68d8ee();
23}
James Price48be7e82024-06-19 22:38:07 +000024
dan sinclairb4697b762023-11-24 09:42:19 +000025kernel void compute_main() {
26 modf_68d8ee();
27}
James Price48be7e82024-06-19 22:38:07 +000028
James Price2cc6b3c2024-06-13 20:31:41 +000029VertexOutput vertex_main_inner() {
30 VertexOutput out = {};
31 out.pos = float4(0.0f);
32 modf_68d8ee();
33 return out;
34}
James Price48be7e82024-06-19 22:38:07 +000035
James Price02cf9112024-05-29 14:43:19 +000036vertex vertex_main_outputs vertex_main() {
James Price6d87fa62024-09-03 23:24:13 +000037 vertex_main_outputs tint_wrapper_result = {};
38 tint_wrapper_result.VertexOutput_pos = vertex_main_inner().pos;
39 return tint_wrapper_result;
James Price02cf9112024-05-29 14:43:19 +000040}