Natalie Chouinard | 6ee6330 | 2024-06-25 20:45:30 +0000 | [diff] [blame] | 1 | RWByteAddressBuffer prevent_dce : register(u0); |
| 2 | |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 3 | vector<float16_t, 4> smoothstep_c43ebd() { |
dan sinclair | 32c28cb | 2022-11-16 23:02:39 +0000 | [diff] [blame] | 4 | vector<float16_t, 4> arg_0 = (float16_t(2.0h)).xxxx; |
| 5 | vector<float16_t, 4> arg_1 = (float16_t(4.0h)).xxxx; |
| 6 | vector<float16_t, 4> arg_2 = (float16_t(3.0h)).xxxx; |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 7 | vector<float16_t, 4> res = smoothstep(arg_0, arg_1, arg_2); |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 8 | return res; |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 9 | } |
| 10 | |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 11 | void fragment_main() { |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 12 | prevent_dce.Store<vector<float16_t, 4> >(0u, smoothstep_c43ebd()); |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 13 | return; |
| 14 | } |
| 15 | |
| 16 | [numthreads(1, 1, 1)] |
| 17 | void compute_main() { |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 18 | prevent_dce.Store<vector<float16_t, 4> >(0u, smoothstep_c43ebd()); |
Zhaoming Jiang | 9443ceb | 2022-08-05 15:15:17 +0000 | [diff] [blame] | 19 | return; |
| 20 | } |
Natalie Chouinard | e902718 | 2024-06-13 18:50:19 +0000 | [diff] [blame] | 21 | |
| 22 | struct VertexOutput { |
| 23 | float4 pos; |
| 24 | vector<float16_t, 4> prevent_dce; |
| 25 | }; |
| 26 | struct tint_symbol_1 { |
| 27 | nointerpolation vector<float16_t, 4> prevent_dce : TEXCOORD0; |
| 28 | float4 pos : SV_Position; |
| 29 | }; |
| 30 | |
| 31 | VertexOutput vertex_main_inner() { |
| 32 | VertexOutput tint_symbol = (VertexOutput)0; |
| 33 | tint_symbol.pos = (0.0f).xxxx; |
| 34 | tint_symbol.prevent_dce = smoothstep_c43ebd(); |
| 35 | return tint_symbol; |
| 36 | } |
| 37 | |
| 38 | tint_symbol_1 vertex_main() { |
| 39 | VertexOutput inner_result = vertex_main_inner(); |
| 40 | tint_symbol_1 wrapper_result = (tint_symbol_1)0; |
| 41 | wrapper_result.pos = inner_result.pos; |
| 42 | wrapper_result.prevent_dce = inner_result.prevent_dce; |
| 43 | return wrapper_result; |
| 44 | } |