blob: 28f8113545c63b4f8b52fbcca2a8863f14b6ab61 [file] [log] [blame]
Ben Clayton13f08902022-10-26 18:36:44 +00001#include <metal_stdlib>
2
3using namespace metal;
Natalie Chouinarde9027182024-06-13 18:50:19 +00004uint2 textureDimensions_dfdc32(depth2d_array<float, access::sample> tint_symbol_1) {
Ben Clayton13f08902022-10-26 18:36:44 +00005 int arg_1 = 1;
6 uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
Natalie Chouinarde9027182024-06-13 18:50:19 +00007 return res;
Ben Clayton13f08902022-10-26 18:36:44 +00008}
9
Natalie Chouinarde9027182024-06-13 18:50:19 +000010fragment void fragment_main(device uint2* tint_symbol_2 [[buffer(0)]], depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
11 *(tint_symbol_2) = textureDimensions_dfdc32(tint_symbol_3);
12 return;
13}
14
15kernel void compute_main(device uint2* tint_symbol_4 [[buffer(0)]], depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
16 *(tint_symbol_4) = textureDimensions_dfdc32(tint_symbol_5);
17 return;
18}
19
20struct VertexOutput {
21 float4 pos;
22 uint2 prevent_dce;
Ben Clayton13f08902022-10-26 18:36:44 +000023};
24
Natalie Chouinarde9027182024-06-13 18:50:19 +000025struct tint_symbol {
26 uint2 prevent_dce [[user(locn0)]] [[flat]];
27 float4 pos [[position]];
28};
29
30VertexOutput vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_6) {
31 VertexOutput out = {};
32 out.pos = float4(0.0f);
33 out.prevent_dce = textureDimensions_dfdc32(tint_symbol_6);
34 return out;
Ben Clayton13f08902022-10-26 18:36:44 +000035}
36
Natalie Chouinarde9027182024-06-13 18:50:19 +000037vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_7 [[texture(0)]]) {
38 VertexOutput const inner_result = vertex_main_inner(tint_symbol_7);
Ben Clayton13f08902022-10-26 18:36:44 +000039 tint_symbol wrapper_result = {};
Natalie Chouinarde9027182024-06-13 18:50:19 +000040 wrapper_result.pos = inner_result.pos;
41 wrapper_result.prevent_dce = inner_result.prevent_dce;
Ben Clayton13f08902022-10-26 18:36:44 +000042 return wrapper_result;
43}
44