Mesh: lower s_cmp_le_u32, v_cmpx_ne_u32 and v_cmpx_lt_u32 (Part of #3703) #3713

Merged
SimSalabimse merged 3 commits from upstream-pr/3713 into main 2026-12-01 11:20:53 +00:00
SimSalabimse commented 2026-12-01 08:57:21 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T08:57:21Z.


Part of #3703 (the s_cmp_le_u32 and v_cmpx_ne_u32 items, plus v_cmpx_lt_u32).

The native mesh frontend now lowers s_cmp_le_u32 (SOPC, SCC = icmp ule), v_cmpx_ne_u32, and v_cmpx_lt_u32 (both EXEC-only writes, no VCC), next to the existing v_cmpx_eq_u32 path. v_cmpx_lt_u32 uses icmp ult. It was seen as the next wall in a game run.

Source-built fixtures in tests/native_direct_mesh_check.py cover equal, less, and greater pairs, the unsigned wrap cases (0 vs all-ones, and the reverse), and a self-compare that gives an empty EXEC, for both s_cmp_le_u32 and v_cmpx_lt_u32. s_cmp_le_i32 and v_cmpx_lt_i32 stay refused.

Linux g++ 13.3 and clang++ 18.1 pass with -Werror=narrowing. native_direct_mesh is a Windows-only dxc test and has not been run on Windows yet, so this is a draft until the Windows test PC run passes.

This sits beside #3666, which adds v_cmpx_eq_i32 and v_cmpx_lt_f32 only. If that one merges first, this may need a trivial rebase.

AI-assisted (Cursor)

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5582368125 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3713). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-01T08:57:21Z. --- Part of #3703 (the s_cmp_le_u32 and v_cmpx_ne_u32 items, plus v_cmpx_lt_u32). The native mesh frontend now lowers s_cmp_le_u32 (SOPC, SCC = icmp ule), v_cmpx_ne_u32, and v_cmpx_lt_u32 (both EXEC-only writes, no VCC), next to the existing v_cmpx_eq_u32 path. v_cmpx_lt_u32 uses icmp ult. It was seen as the next wall in a game run. Source-built fixtures in tests/native_direct_mesh_check.py cover equal, less, and greater pairs, the unsigned wrap cases (0 vs all-ones, and the reverse), and a self-compare that gives an empty EXEC, for both s_cmp_le_u32 and v_cmpx_lt_u32. s_cmp_le_i32 and v_cmpx_lt_i32 stay refused. Linux g++ 13.3 and clang++ 18.1 pass with -Werror=narrowing. native_direct_mesh is a Windows-only dxc test and has not been run on Windows yet, so this is a draft until the Windows test PC run passes. This sits beside #3666, which adds v_cmpx_eq_i32 and v_cmpx_lt_f32 only. If that one merges first, this may need a trivial rebase. AI-assisted (Cursor)
SimSalabimse commented 2026-12-01 09:53:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T09:53:02Z.


Tested on the Windows test PC at head d60a1f7a, dev preset.

native_direct_mesh passed, including the new s_cmp_le_u32, v_cmpx_ne_u32 and v_cmpx_lt_u32 cases (wrap-case asserts now accept DXC's -1 spelling).

WARP/CPU ctest -R mesh (excluding _hardware and the real-device audio tests), -j 6: 122/122 passed.

Hardware mesh was 78/78 at 7ed70cc5 (same lowerer; this commit is test-only).

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7307345887 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3713#issuecomment-7307345887). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-01T09:53:02Z. --- Tested on the Windows test PC at head d60a1f7a, dev preset. `native_direct_mesh` passed, including the new `s_cmp_le_u32`, `v_cmpx_ne_u32` and `v_cmpx_lt_u32` cases (wrap-case asserts now accept DXC's `-1` spelling). WARP/CPU `ctest -R mesh` (excluding `_hardware` and the real-device audio tests), `-j 6`: 122/122 passed. Hardware mesh was 78/78 at `7ed70cc5` (same lowerer; this commit is test-only). AI-Assisted
R0Y00 commented 2026-12-01 11:20:49 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-01T11:20:49Z.

Review: APPROVED


Reviewed the CMPX EXEC intersection and unsigned scalar comparison. Integrated native_direct_mesh passed locally, including the comparison and destination controls.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6130201191 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3713#pullrequestreview-6130201191). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-01T11:20:49Z. **Review:** APPROVED --- Reviewed the CMPX EXEC intersection and unsigned scalar comparison. Integrated native_direct_mesh passed locally, including the comparison and destination controls.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3713
No description provided.