blob: c0f78f7c30e8f46a92075ce3d2c5bd810012b3f9 [file] [log] [blame]
dan sinclair892af222024-12-06 14:16:09 +00001//
2// fragment_main
3//
Ben Clayton86d1ad02024-02-21 08:11:33 +00004#include <metal_stdlib>
5
6using namespace metal;
Natalie Chouinarde9027182024-06-13 18:50:19 +00007uint4 bitcast_160c09() {
Ben Clayton86d1ad02024-02-21 08:11:33 +00008 uint4 res = uint4(1u);
Natalie Chouinarde9027182024-06-13 18:50:19 +00009 return res;
Ben Clayton86d1ad02024-02-21 08:11:33 +000010}
11
dan sinclair892af222024-12-06 14:16:09 +000012struct VertexOutput {
13 float4 pos;
14 uint4 prevent_dce;
15};
16
17fragment void fragment_main(device uint4* tint_symbol [[buffer(0)]]) {
18 *(tint_symbol) = bitcast_160c09();
Natalie Chouinarde9027182024-06-13 18:50:19 +000019 return;
20}
21
dan sinclair892af222024-12-06 14:16:09 +000022//
23// compute_main
24//
25#include <metal_stdlib>
26
27using namespace metal;
28uint4 bitcast_160c09() {
29 uint4 res = uint4(1u);
30 return res;
31}
32
33struct VertexOutput {
34 float4 pos;
35 uint4 prevent_dce;
36};
37
38kernel void compute_main(device uint4* tint_symbol [[buffer(0)]]) {
39 *(tint_symbol) = bitcast_160c09();
Natalie Chouinarde9027182024-06-13 18:50:19 +000040 return;
41}
42
dan sinclair892af222024-12-06 14:16:09 +000043//
44// vertex_main
45//
46#include <metal_stdlib>
47
48using namespace metal;
49uint4 bitcast_160c09() {
50 uint4 res = uint4(1u);
51 return res;
52}
53
Natalie Chouinarde9027182024-06-13 18:50:19 +000054struct VertexOutput {
55 float4 pos;
56 uint4 prevent_dce;
Ben Clayton86d1ad02024-02-21 08:11:33 +000057};
58
Natalie Chouinarde9027182024-06-13 18:50:19 +000059struct tint_symbol {
60 uint4 prevent_dce [[user(locn0)]] [[flat]];
61 float4 pos [[position]];
62};
63
64VertexOutput vertex_main_inner() {
65 VertexOutput out = {};
66 out.pos = float4(0.0f);
67 out.prevent_dce = bitcast_160c09();
68 return out;
Ben Clayton86d1ad02024-02-21 08:11:33 +000069}
70
Natalie Chouinarde9027182024-06-13 18:50:19 +000071vertex tint_symbol vertex_main() {
72 VertexOutput const inner_result = vertex_main_inner();
Ben Clayton86d1ad02024-02-21 08:11:33 +000073 tint_symbol wrapper_result = {};
Natalie Chouinarde9027182024-06-13 18:50:19 +000074 wrapper_result.pos = inner_result.pos;
75 wrapper_result.prevent_dce = inner_result.prevent_dce;
Ben Clayton86d1ad02024-02-21 08:11:33 +000076 return wrapper_result;
77}
78