Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 1 | RWByteAddressBuffer prevent_dce : register(u0, space2); |
| 2 | |
Ben Clayton | 8169693 | 2022-02-23 18:20:30 +0000 | [diff] [blame] | 3 | void firstLeadingBit_a622c2() { |
Antonio Maiorano | 1abe52d | 2022-10-31 20:34:36 +0000 | [diff] [blame] | 4 | int2 res = (0).xx; |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 5 | prevent_dce.Store2(0u, asuint(res)); |
Ben Clayton | 8169693 | 2022-02-23 18:20:30 +0000 | [diff] [blame] | 6 | } |
| 7 | |
| 8 | struct tint_symbol { |
| 9 | float4 value : SV_Position; |
| 10 | }; |
| 11 | |
| 12 | float4 vertex_main_inner() { |
| 13 | firstLeadingBit_a622c2(); |
Ben Clayton | e9f8b09 | 2022-06-01 13:14:39 +0000 | [diff] [blame] | 14 | return (0.0f).xxxx; |
Ben Clayton | 8169693 | 2022-02-23 18:20:30 +0000 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | tint_symbol vertex_main() { |
Antonio Maiorano | 144ebed | 2024-01-30 16:30:15 +0000 | [diff] [blame] | 18 | float4 inner_result = vertex_main_inner(); |
Ben Clayton | 8169693 | 2022-02-23 18:20:30 +0000 | [diff] [blame] | 19 | tint_symbol wrapper_result = (tint_symbol)0; |
| 20 | wrapper_result.value = inner_result; |
| 21 | return wrapper_result; |
| 22 | } |
| 23 | |
| 24 | void fragment_main() { |
| 25 | firstLeadingBit_a622c2(); |
| 26 | return; |
| 27 | } |
| 28 | |
| 29 | [numthreads(1, 1, 1)] |
| 30 | void compute_main() { |
| 31 | firstLeadingBit_a622c2(); |
| 32 | return; |
| 33 | } |