Ben Clayton | 9c7cd9e | 2021-09-27 21:40:33 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | |
| 3 | using namespace metal; |
| 4 | struct VertexInputs0 { |
| 5 | uint vertex_index; |
| 6 | int loc0; |
| 7 | }; |
Ben Clayton | 8ec32a6 | 2022-02-09 23:55:51 +0000 | [diff] [blame] | 8 | |
Ben Clayton | 9c7cd9e | 2021-09-27 21:40:33 +0000 | [diff] [blame] | 9 | struct VertexInputs1 { |
| 10 | uint loc1; |
| 11 | float4 loc3; |
| 12 | }; |
Ben Clayton | 8ec32a6 | 2022-02-09 23:55:51 +0000 | [diff] [blame] | 13 | |
Ben Clayton | 9c7cd9e | 2021-09-27 21:40:33 +0000 | [diff] [blame] | 14 | struct tint_symbol_2 { |
| 15 | int loc0 [[attribute(0)]]; |
| 16 | uint loc1 [[attribute(1)]]; |
| 17 | uint loc1_1 [[attribute(2)]]; |
| 18 | float4 loc3 [[attribute(3)]]; |
| 19 | }; |
Ben Clayton | 8ec32a6 | 2022-02-09 23:55:51 +0000 | [diff] [blame] | 20 | |
Ben Clayton | 9c7cd9e | 2021-09-27 21:40:33 +0000 | [diff] [blame] | 21 | struct tint_symbol_3 { |
| 22 | float4 value [[position]]; |
| 23 | }; |
| 24 | |
| 25 | float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { |
| 26 | uint const foo = (inputs0.vertex_index + instance_index); |
Ben Clayton | cb6ddd2 | 2022-06-01 10:08:29 +0000 | [diff] [blame] | 27 | return float4(0.0f); |
Ben Clayton | 9c7cd9e | 2021-09-27 21:40:33 +0000 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | vertex tint_symbol_3 tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { |
| 31 | VertexInputs0 const tint_symbol_4 = {.vertex_index=vertex_index, .loc0=tint_symbol_1.loc0}; |
| 32 | VertexInputs1 const tint_symbol_5 = {.loc1=tint_symbol_1.loc1_1, .loc3=tint_symbol_1.loc3}; |
| 33 | float4 const inner_result = tint_symbol_inner(tint_symbol_4, tint_symbol_1.loc1, instance_index, tint_symbol_5); |
| 34 | tint_symbol_3 wrapper_result = {}; |
| 35 | wrapper_result.value = inner_result; |
| 36 | return wrapper_result; |
| 37 | } |
| 38 | |