Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 1 | RWByteAddressBuffer prevent_dce : register(u0, space2); |
| 2 | |
Ben Clayton | 751e668 | 2022-09-13 22:57:52 +0000 | [diff] [blame] | 3 | void saturate_a5b571() { |
dan sinclair | 91ed6f7 | 2022-10-27 16:41:44 +0000 | [diff] [blame] | 4 | float4 arg_0 = (2.0f).xxxx; |
Ben Clayton | 751e668 | 2022-09-13 22:57:52 +0000 | [diff] [blame] | 5 | float4 res = saturate(arg_0); |
Ben Clayton | 77a90cb | 2023-03-06 18:25:08 +0000 | [diff] [blame] | 6 | prevent_dce.Store4(0u, asuint(res)); |
Ben Clayton | 751e668 | 2022-09-13 22:57:52 +0000 | [diff] [blame] | 7 | } |
| 8 | |
| 9 | struct tint_symbol { |
| 10 | float4 value : SV_Position; |
| 11 | }; |
| 12 | |
| 13 | float4 vertex_main_inner() { |
| 14 | saturate_a5b571(); |
| 15 | return (0.0f).xxxx; |
| 16 | } |
| 17 | |
| 18 | tint_symbol vertex_main() { |
| 19 | const float4 inner_result = vertex_main_inner(); |
| 20 | tint_symbol wrapper_result = (tint_symbol)0; |
| 21 | wrapper_result.value = inner_result; |
| 22 | return wrapper_result; |
| 23 | } |
| 24 | |
| 25 | void fragment_main() { |
| 26 | saturate_a5b571(); |
| 27 | return; |
| 28 | } |
| 29 | |
| 30 | [numthreads(1, 1, 1)] |
| 31 | void compute_main() { |
| 32 | saturate_a5b571(); |
| 33 | return; |
| 34 | } |