James Price | 05c83963 | 2023-08-11 13:55:52 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
James Price | d90c72b | 2023-08-11 00:45:54 +0000 | [diff] [blame] | 2 | |
James Price | 05c83963 | 2023-08-11 13:55:52 +0000 | [diff] [blame] | 3 | using namespace metal; |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 4 | uint4 textureLoad_a3733f(texture2d<uint, access::read_write> tint_symbol_1) { |
James Price | 05c83963 | 2023-08-11 13:55:52 +0000 | [diff] [blame] | 5 | uint4 res = tint_symbol_1.read(uint2(int2(1))); |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 6 | return res; |
James Price | d90c72b | 2023-08-11 00:45:54 +0000 | [diff] [blame] | 7 | } |
| 8 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 9 | fragment void fragment_main(device uint4* tint_symbol_2 [[buffer(0)]], texture2d<uint, access::read_write> tint_symbol_3 [[texture(0)]]) { |
| 10 | *(tint_symbol_2) = textureLoad_a3733f(tint_symbol_3); |
| 11 | return; |
| 12 | } |
| 13 | |
| 14 | kernel void compute_main(device uint4* tint_symbol_4 [[buffer(0)]], texture2d<uint, access::read_write> tint_symbol_5 [[texture(0)]]) { |
| 15 | *(tint_symbol_4) = textureLoad_a3733f(tint_symbol_5); |
| 16 | return; |
| 17 | } |
| 18 | |
| 19 | struct VertexOutput { |
| 20 | float4 pos; |
| 21 | uint4 prevent_dce; |
James Price | 05c83963 | 2023-08-11 13:55:52 +0000 | [diff] [blame] | 22 | }; |
James Price | d90c72b | 2023-08-11 00:45:54 +0000 | [diff] [blame] | 23 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 24 | struct tint_symbol { |
| 25 | uint4 prevent_dce [[user(locn0)]] [[flat]]; |
| 26 | float4 pos [[position]]; |
| 27 | }; |
| 28 | |
| 29 | VertexOutput vertex_main_inner(texture2d<uint, access::read_write> tint_symbol_6) { |
| 30 | VertexOutput out = {}; |
| 31 | out.pos = float4(0.0f); |
| 32 | out.prevent_dce = textureLoad_a3733f(tint_symbol_6); |
| 33 | return out; |
James Price | d90c72b | 2023-08-11 00:45:54 +0000 | [diff] [blame] | 34 | } |
| 35 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 36 | vertex tint_symbol vertex_main(texture2d<uint, access::read_write> tint_symbol_7 [[texture(0)]]) { |
| 37 | VertexOutput const inner_result = vertex_main_inner(tint_symbol_7); |
James Price | 05c83963 | 2023-08-11 13:55:52 +0000 | [diff] [blame] | 38 | tint_symbol wrapper_result = {}; |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 39 | wrapper_result.pos = inner_result.pos; |
| 40 | wrapper_result.prevent_dce = inner_result.prevent_dce; |
James Price | 05c83963 | 2023-08-11 13:55:52 +0000 | [diff] [blame] | 41 | return wrapper_result; |
James Price | d90c72b | 2023-08-11 00:45:54 +0000 | [diff] [blame] | 42 | } |
| 43 | |