Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | |
| 3 | using namespace metal; |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 4 | uint2 textureDimensions_dfdc32(depth2d_array<float, access::sample> tint_symbol_1) { |
Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 5 | int arg_1 = 1; |
| 6 | uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1)); |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 7 | return res; |
Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 8 | } |
| 9 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 10 | fragment 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 | |
| 15 | kernel 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 | |
| 20 | struct VertexOutput { |
| 21 | float4 pos; |
| 22 | uint2 prevent_dce; |
Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 23 | }; |
| 24 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 25 | struct tint_symbol { |
| 26 | uint2 prevent_dce [[user(locn0)]] [[flat]]; |
| 27 | float4 pos [[position]]; |
| 28 | }; |
| 29 | |
| 30 | VertexOutput 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 Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 35 | } |
| 36 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 37 | vertex 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 Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 39 | tint_symbol wrapper_result = {}; |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 40 | wrapper_result.pos = inner_result.pos; |
| 41 | wrapper_result.prevent_dce = inner_result.prevent_dce; |
Ben Clayton | 13f0890 | 2022-10-26 18:36:44 +0000 | [diff] [blame] | 42 | return wrapper_result; |
| 43 | } |
| 44 | |