James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 1 | struct S { |
Ben Clayton | 165512c | 2021-06-18 21:15:25 +0000 | [diff] [blame] | 2 | float f; |
| 3 | uint u; |
| 4 | float4 v; |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 5 | }; |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 6 | |
Ben Clayton | 5d2f34e | 2021-06-16 09:19:36 +0000 | [diff] [blame] | 7 | RWByteAddressBuffer output : register(u0, space0); |
| 8 | |
| 9 | struct tint_symbol_1 { |
| 10 | float f : TEXCOORD0; |
James Price | a41694e | 2021-10-21 23:08:44 +0000 | [diff] [blame] | 11 | nointerpolation uint u : TEXCOORD1; |
Ben Clayton | 5d2f34e | 2021-06-16 09:19:36 +0000 | [diff] [blame] | 12 | float4 v : SV_Position; |
| 13 | }; |
| 14 | |
Ben Clayton | 883fb63 | 2021-07-16 19:47:44 +0000 | [diff] [blame] | 15 | void tint_symbol_2(RWByteAddressBuffer buffer, uint offset, S value) { |
Ben Clayton | 8a96c78 | 2021-07-15 20:29:09 +0000 | [diff] [blame] | 16 | buffer.Store((offset + 0u), asuint(value.f)); |
| 17 | buffer.Store((offset + 4u), asuint(value.u)); |
| 18 | buffer.Store4((offset + 128u), asuint(value.v)); |
| 19 | } |
| 20 | |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 21 | void frag_main_inner(S input) { |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 22 | const float f = input.f; |
| 23 | const uint u = input.u; |
| 24 | const float4 v = input.v; |
Ben Clayton | 883fb63 | 2021-07-16 19:47:44 +0000 | [diff] [blame] | 25 | tint_symbol_2(output, 0u, input); |
James Price | a5d73ce | 2021-08-04 22:15:28 +0000 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | void frag_main(tint_symbol_1 tint_symbol) { |
| 29 | const S tint_symbol_6 = {tint_symbol.f, tint_symbol.u, tint_symbol.v}; |
| 30 | frag_main_inner(tint_symbol_6); |
James Price | bb0496e | 2021-06-03 09:38:34 +0000 | [diff] [blame] | 31 | return; |
| 32 | } |