dan sinclair | 892af22 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 1 | // |
| 2 | // fragment_main |
| 3 | // |
| 4 | #include <metal_stdlib> |
| 5 | |
| 6 | using namespace metal; |
| 7 | float textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { |
| 8 | float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), level(1u)); |
| 9 | return res; |
| 10 | } |
| 11 | |
| 12 | struct VertexOutput { |
| 13 | float4 pos; |
| 14 | float prevent_dce; |
| 15 | }; |
| 16 | |
| 17 | fragment void fragment_main(device float* tint_symbol_2 [[buffer(0)]], depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) { |
| 18 | *(tint_symbol_2) = textureSampleLevel_73e892(tint_symbol_3, tint_symbol_4); |
| 19 | return; |
| 20 | } |
| 21 | |
| 22 | // |
| 23 | // compute_main |
| 24 | // |
| 25 | #include <metal_stdlib> |
| 26 | |
| 27 | using namespace metal; |
| 28 | float textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { |
| 29 | float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), level(1u)); |
| 30 | return res; |
| 31 | } |
| 32 | |
| 33 | struct VertexOutput { |
| 34 | float4 pos; |
| 35 | float prevent_dce; |
| 36 | }; |
| 37 | |
| 38 | kernel void compute_main(device float* tint_symbol_2 [[buffer(0)]], depth2d<float, access::sample> tint_symbol_3 [[texture(0)]], sampler tint_symbol_4 [[sampler(0)]]) { |
| 39 | *(tint_symbol_2) = textureSampleLevel_73e892(tint_symbol_3, tint_symbol_4); |
| 40 | return; |
| 41 | } |
| 42 | |
| 43 | // |
| 44 | // vertex_main |
| 45 | // |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 46 | #include <metal_stdlib> |
| 47 | |
| 48 | using namespace metal; |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 49 | float textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { |
Ben Clayton | 4b60615 | 2022-11-04 17:06:03 +0000 | [diff] [blame] | 50 | float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1u)); |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 51 | return res; |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 52 | } |
| 53 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 54 | struct VertexOutput { |
| 55 | float4 pos; |
| 56 | float prevent_dce; |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 57 | }; |
| 58 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 59 | struct tint_symbol { |
| 60 | float prevent_dce [[user(locn0)]] [[flat]]; |
| 61 | float4 pos [[position]]; |
| 62 | }; |
| 63 | |
dan sinclair | 892af22 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 64 | VertexOutput vertex_main_inner(depth2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) { |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 65 | VertexOutput out = {}; |
| 66 | out.pos = float4(0.0f); |
dan sinclair | 892af22 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 67 | out.prevent_dce = textureSampleLevel_73e892(tint_symbol_3, tint_symbol_4); |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 68 | return out; |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 69 | } |
| 70 | |
dan sinclair | 892af22 | 2024-12-06 14:16:09 +0000 | [diff] [blame] | 71 | vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]]) { |
| 72 | VertexOutput const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6); |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 73 | tint_symbol wrapper_result = {}; |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 74 | wrapper_result.pos = inner_result.pos; |
| 75 | wrapper_result.prevent_dce = inner_result.prevent_dce; |
Ben Clayton | da5424b | 2022-10-24 23:58:53 +0000 | [diff] [blame] | 76 | return wrapper_result; |
| 77 | } |
| 78 | |