dan sinclair | 8f1d276 | 2024-07-31 02:35:40 +0000 | [diff] [blame] | 1 | struct VertexOutput { |
| 2 | float4 pos; |
| 3 | int2 prevent_dce; |
| 4 | }; |
dan sinclair | 6931379 | 2024-06-13 20:35:21 +0000 | [diff] [blame] | 5 | |
dan sinclair | 8f1d276 | 2024-07-31 02:35:40 +0000 | [diff] [blame] | 6 | struct vertex_main_outputs { |
| 7 | nointerpolation int2 VertexOutput_prevent_dce : TEXCOORD0; |
| 8 | float4 VertexOutput_pos : SV_Position; |
| 9 | }; |
| 10 | |
| 11 | |
| 12 | RWByteAddressBuffer prevent_dce : register(u0); |
| 13 | int2 countTrailingZeros_327c37() { |
Antonio Maiorano | d032c62 | 2024-09-19 18:20:54 +0000 | [diff] [blame] | 14 | int2 arg_0 = (int(1)).xx; |
dan sinclair | 8f1d276 | 2024-07-31 02:35:40 +0000 | [diff] [blame] | 15 | uint2 v = asuint(arg_0); |
| 16 | uint2 v_1 = ((((v & (65535u).xx) == (0u).xx)) ? ((16u).xx) : ((0u).xx)); |
| 17 | uint2 v_2 = (((((v >> v_1) & (255u).xx) == (0u).xx)) ? ((8u).xx) : ((0u).xx)); |
| 18 | uint2 v_3 = ((((((v >> v_1) >> v_2) & (15u).xx) == (0u).xx)) ? ((4u).xx) : ((0u).xx)); |
| 19 | uint2 v_4 = (((((((v >> v_1) >> v_2) >> v_3) & (3u).xx) == (0u).xx)) ? ((2u).xx) : ((0u).xx)); |
| 20 | uint2 v_5 = ((((((((v >> v_1) >> v_2) >> v_3) >> v_4) & (1u).xx) == (0u).xx)) ? ((1u).xx) : ((0u).xx)); |
| 21 | int2 res = asint(((v_1 | (v_2 | (v_3 | (v_4 | v_5)))) + (((((((v >> v_1) >> v_2) >> v_3) >> v_4) == (0u).xx)) ? ((1u).xx) : ((0u).xx)))); |
| 22 | return res; |
| 23 | } |
| 24 | |
| 25 | void fragment_main() { |
| 26 | prevent_dce.Store2(0u, asuint(countTrailingZeros_327c37())); |
| 27 | } |
| 28 | |
| 29 | [numthreads(1, 1, 1)] |
| 30 | void compute_main() { |
| 31 | prevent_dce.Store2(0u, asuint(countTrailingZeros_327c37())); |
| 32 | } |
| 33 | |
| 34 | VertexOutput vertex_main_inner() { |
| 35 | VertexOutput tint_symbol = (VertexOutput)0; |
| 36 | tint_symbol.pos = (0.0f).xxxx; |
| 37 | tint_symbol.prevent_dce = countTrailingZeros_327c37(); |
| 38 | VertexOutput v_6 = tint_symbol; |
| 39 | return v_6; |
| 40 | } |
| 41 | |
| 42 | vertex_main_outputs vertex_main() { |
| 43 | VertexOutput v_7 = vertex_main_inner(); |
| 44 | VertexOutput v_8 = v_7; |
| 45 | VertexOutput v_9 = v_7; |
| 46 | vertex_main_outputs v_10 = {v_9.prevent_dce, v_8.pos}; |
| 47 | return v_10; |
| 48 | } |
| 49 | |