James Price | 851b18b | 2021-06-03 18:12:15 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | |
| 3 | using namespace metal; |
| 4 | struct S { |
| 5 | /* 0x0000 */ float f; |
| 6 | /* 0x0004 */ uint u; |
Ben Clayton | 885488d | 2021-06-30 16:01:40 +0000 | [diff] [blame] | 7 | /* 0x0008 */ int8_t tint_pad[120]; |
James Price | 851b18b | 2021-06-03 18:12:15 +0000 | [diff] [blame] | 8 | /* 0x0080 */ packed_float4 v; |
| 9 | /* 0x0090 */ int8_t tint_pad_1[112]; |
| 10 | }; |
James Price | 7697c31 | 2021-06-04 14:40:28 +0000 | [diff] [blame] | 11 | struct tint_symbol_2 { |
James Price | 851b18b | 2021-06-03 18:12:15 +0000 | [diff] [blame] | 12 | float f [[user(locn0)]]; |
| 13 | uint u [[user(locn1)]]; |
James Price | 851b18b | 2021-06-03 18:12:15 +0000 | [diff] [blame] | 14 | }; |
| 15 | |
James Price | 7697c31 | 2021-06-04 14:40:28 +0000 | [diff] [blame] | 16 | fragment void frag_main(float4 tint_symbol_1 [[position]], tint_symbol_2 tint_symbol [[stage_in]], device S& output [[buffer(0)]]) { |
| 17 | S const input = {.f=tint_symbol.f, .u=tint_symbol.u, .v=tint_symbol_1}; |
James Price | 851b18b | 2021-06-03 18:12:15 +0000 | [diff] [blame] | 18 | float const f = input.f; |
| 19 | uint const u = input.u; |
| 20 | float4 const v = input.v; |
| 21 | output = input; |
| 22 | return; |
| 23 | } |
| 24 | |