James Price | f8e0b7d | 2021-06-28 23:04:43 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
James Price | 545f4e0 | 2021-06-28 23:04:43 +0000 | [diff] [blame] | 2 | |
James Price | f8e0b7d | 2021-06-28 23:04:43 +0000 | [diff] [blame] | 3 | using namespace metal; |
| 4 | struct In { |
| 5 | float none; |
| 6 | float flat; |
| 7 | float perspective_center; |
| 8 | float perspective_centroid; |
| 9 | float perspective_sample; |
| 10 | float linear_center; |
| 11 | float linear_centroid; |
| 12 | float linear_sample; |
| 13 | }; |
Ben Clayton | 8ec32a6 | 2022-02-09 23:55:51 +0000 | [diff] [blame] | 14 | |
James Price | f8e0b7d | 2021-06-28 23:04:43 +0000 | [diff] [blame] | 15 | struct tint_symbol_2 { |
| 16 | float none [[user(locn0)]]; |
| 17 | float flat [[user(locn1)]] [[flat]]; |
| 18 | float perspective_center [[user(locn2)]] [[center_perspective]]; |
| 19 | float perspective_centroid [[user(locn3)]] [[centroid_perspective]]; |
| 20 | float perspective_sample [[user(locn4)]] [[sample_perspective]]; |
| 21 | float linear_center [[user(locn5)]] [[center_no_perspective]]; |
| 22 | float linear_centroid [[user(locn6)]] [[centroid_no_perspective]]; |
| 23 | float linear_sample [[user(locn7)]] [[sample_no_perspective]]; |
| 24 | }; |
| 25 | |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 26 | void tint_symbol_inner(In in) { |
| 27 | } |
| 28 | |
James Price | f8e0b7d | 2021-06-28 23:04:43 +0000 | [diff] [blame] | 29 | fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) { |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 30 | In const tint_symbol_3 = {.none=tint_symbol_1.none, .flat=tint_symbol_1.flat, .perspective_center=tint_symbol_1.perspective_center, .perspective_centroid=tint_symbol_1.perspective_centroid, .perspective_sample=tint_symbol_1.perspective_sample, .linear_center=tint_symbol_1.linear_center, .linear_centroid=tint_symbol_1.linear_centroid, .linear_sample=tint_symbol_1.linear_sample}; |
| 31 | tint_symbol_inner(tint_symbol_3); |
James Price | f8e0b7d | 2021-06-28 23:04:43 +0000 | [diff] [blame] | 32 | return; |
| 33 | } |
James Price | 545f4e0 | 2021-06-28 23:04:43 +0000 | [diff] [blame] | 34 | |