Repository navigation
Conversation
…ontend v_cvt_f16_f32 and v_cvt_f32_f16 reuse the shared ALU (RNE rounding into the low word with the high word kept, and legacyF16ToF32). v_cmpx_eq_i32 and v_cmpx_lt_f32 narrow the lane mask like v_cmpx_eq_u32: EQ is the same bit test signed or unsigned, and LT_F32 is ordered. Part of R0Y00#2413. Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
Main already lowers v_cvt_f16_f32 and every ordered f32 CMPX (float_cmpx), so v_cmpx_lt_f32 goes back to that branch and the duplicate v_cvt_f16_f32 check is dropped. v_cmpx_le_f32 is now lowered, so the refusal control uses v_cmpx_ne_i32. The v_cmpx_lt_f32 check pins the inline 0 as the first fcmp operand (review note). Part of R0Y00#2413.
R0Y00
left a comment
There was a problem hiding this comment.
I reviewed 294efc0 and independently ran Windows/MSVC Debug cmake --build --preset dev --target compile_dxil and ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^native_direct_mesh$' (1/1). The two remaining forms use the existing partial-EXEC rules, and the fixture retains the unsupported compare refusal. Please coordinate with @Kawiu on whether to carry this reduced change in #3666 or here so we land it once.
R0Y00
left a comment
There was a problem hiding this comment.
The updated head a67cf53 includes #3885, which fixes the old Linux 84 != 83 error. I ran python -B tests/standin_exports_check.py (476 checks, six mutations) and Windows/MSVC Debug ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^native_direct_mesh$' (1/1), both passed. The choice of landing PR with @Kawiu is still open.
|
Independent MSVC Debug check at |
R0Y00
left a comment
There was a problem hiding this comment.
Technical approval for a67cf53. I independently rebuilt compile_dxil and d3d12_xs.dll with MSVC Debug and ran native_direct_mesh (1/1), including the emitted signed equality path, half-to-float conversion and unsupported signed CMPX refusal. Current main merges cleanly and required CI passed. This fixture checks emitted DXIL. The original submission #3666 and this carried branch still need a single landing choice.
Carries #3666 by @Kawiu with their commits. Part of #2413.
#3666 is approved but conflicts with
main. The author's commit is kept with its authorship and message (9032cea5e); one commit on top reduces it to whatmainstill lacks. @Kawiu, if you would rather rebase #3666 yourself, say so and I will close this PR.Change
Since #3666 was opened,
mainlowersv_cvt_f16_f32and every ordered f32 CMPX compare,v_cmpx_lt_f32included, inlower_mesh. Two of the four forms are still missing, and this PR adds them insrc/gfx1013_direct_mesh.inl:v_cmpx_eq_i32narrows the lane mask likev_cmpx_eq_u32: the new lane-active predicate is the parent mask AND the lane's own compare. EQ is the same bit test signed or unsigned. The existing refusals apply: no DPP, SDWA, abs, neg, omod or clamp.v_cvt_f32_f16joins the lane-ALU list and uses the shared lowering (legacyF16ToF32), so the partial-EXEC write merge applies unchanged.Changed from #3666, in
294efc0c2:v_cmpx_lt_f32goes back tomain's f32 CMPX branch, and the duplicatev_cvt_f16_f32check is dropped.v_cmpx_le_f32is now lowered onmain, so the refusal control usesv_cmpx_ne_i32(VOPC0x95).v_cmpx_lt_f32check now requires the firstfcmp oltoperand to be the value built from the inline 0, so swapped operands fail it.The diff against
mainis 2 files, +31 -2.Validation
Windows, MSVC, dev preset, head
294efc0c2.Result: On the exact head of this branch, with MSVC:
native_direct_meshpasses, including the newv_cmpx_eq_i32andv_cvt_f32_f16cases and thev_cmpx_ne_i32control.tests/native_direct_mesh_check.pyadds, on the existing source-built triangle:v_cvt_f32_f16 v1, v2: the exported X is the bitcast ofdx.op.legacyF16ToF32(131, ...).v_cmpx_eq_u32,v_cmpx_eq_i32andv_cmpx_lt_f32in a save / compare /s_cbranch_execz/ restore sequence: the lane predicate is thebrcondition of the work block, the write isselect i1 <predicate>, i32 2, i32 <old v1>, and the joinphitakes the old value from the empty edge and feeds the exported X.v_cmpx_ne_i32in the same sequence is refused withunsupported mesh instruction or EXEC state: v_cmpx_ne_i32.Known limits