Repository navigation
Conversation
v_add_co_u32, v_add_co_ci_u32, v_sub_co_u32, v_subrev_co_u32, v_sub_co_ci_u32 and v_subrev_co_ci_u32 with the carry-out in an SGPR pair or in VCC and the carry-in from an SGPR pair or from VCC, per lane of one 64-lane group. The carry-in mask differs between the two halves, so a mask cut to its low word or with its words swapped shows. The test dumps 922 words (13 ops x 64 lanes, a flag word per lane, s_bcnt1 / s_ff1 of every mask), derived from the ISA pseudocode in the .asm header. The wave32 counterpart is cs_w32_dot4_carry (ItsNotRexed#2311). check.py gets W64X_FULL for wave64 tests judged on a whole dump (--require-wave64, a skip on a device without 64-wide subgroups, no flag with LEONIDA_W64_EMULATE=1). AI-assisted.
v_cmp i32/u32/i64/u64/f32 (NaN, infinity, class) into SGPR pairs and into VCC, the 64-bit SALU logic ops on those masks (s_and/or/xor/andn2/orn2/nor/xnor_b64), and v_cndmask with the masks as selectors, per lane of one 64-lane group. The inputs differ between the two halves, so a mask cut to its low word, with its words swapped, or from a 64-bit compare of the low words alone is a different mask. The test dumps 430 words (a flag word per lane, five v_cndmask selections, s_bcnt1 / s_ff1 of every mask), derived from the ISA pseudocode in the .asm header. AI-assisted.
AI-assisted.
AI-assisted.
|
Independent test of 2b3f7e8 on Windows 11 build 26300, RTX 5070, driver 621.24. All four semantic tests passed, and Vulkan 1.2
Synthetic fixture only. AI-assisted review. |
|
Tested 2b3f7e8 on an RTX 3060 12 GB (subgroup 32..32), NVIDIA 621.14, Vulkan 1.4.357, Windows 11 26H2: pass. With LEONIDA_W64_EMULATE=1, I ran scripts/run_gpu_tests.py --filter cs_w64x_vcmp using harnesses built from the same commit. The shader passed spirv-val and all 430/430 output words matched exactly (exit 0). Tools: llvm-mingw Clang 23.1.6, llvm-mc 23.1.6, SPIRV-Tools 2026.4. Synthetic inputs only. AI-assisted setup and verification; test ran locally. |
|
Tested 2b3f7e8 on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested 2b3f7e8 on AMD Radeon RX 9060 XT (RDNA4), AMD driver 26.10.44 (LLPC, Vulkan driver 2.0.395), Windows 11 Pro 10.0.26300, subgroup 32..64: pass. The checks above have no AMD run from outside the author; this adds an AMD card with native 64-wide subgroups.
Test programs: an MSVC 14.44 build of 4947579, this PR's base; the PR changes no C++ or CMake. llvm-mc 21.1.8 (native), Vulkan SDK 1.4.363.0. No negative control run here. No game files. AI-assisted (Claude Code). |
Conflicts: scripts/run_gpu_tests.py tests/test_shader_checks.py AI-assisted.
|
Tested
No game files. AI-assisted (Claude Code). |
scripts/run_gpu_tests.py tests/semantic/regen_fixtures.py tests/test_shader_checks.py AI-assisted.
|
Tested
AI-assisted (Claude Code). Synthetic shaders only, no game files. |
|
Tested
Counts and pass/fail only; no game data. No code changes. AI-assisted. |
|
Tested
No game files. AI-assisted (Claude Code). |
Requested by Lucas · project thread
Claimed in the coordination issue as: EGEN-W64-VCMP, #2300 (comment)
Depends on: #2415 (this branch is stacked on it: it adds
W64X_FULLtocheck.py, whichcs_w64x_vcmpuses; until #2415 lands the diff shows its commits too).What and why
Compare results are lane masks. The wave32 compare tests (
ps_vcmp_*, #1299 and #2220) are pixel shaders on 32 lanes; no GPU test checks a compare mask that is a 64-bit SGPR pair or VCC over 64 lanes. This addscs_w64x_vcmp, one 64-lane group (acs_w64x_*cross-half test):v_cmpmasks: signed/unsigned i32,v_cmp_lt_u64andv_cmp_gt_i64(both words matter: the low words alone give a different mask), f32 with NaN, signaling NaN and infinity lanes (lt,nlt,u,o,neq,lg),v_cmp_class_f32with a per-half class mask; two of them go to VCC (v_cmp_ne_u32_e32,v_cmp_ge_i32_e64 vcc), the rest to SGPR pairs.s_and,s_or,s_xor,s_andn2,s_orn2,s_nor,s_xnor_b64).v_cndmaskselectors (VOP3 with an SGPR pair, VOP2 with VCC).v_cndmask, so the check does not depend on how an SGPR pair reads as data), fivev_cndmaskselection arrays, ands_bcnt1_i32_b64/s_ff1_i32_b64of every mask. The.asmheader lists each mask as a 64-bit constant derived from the ISA definition;W64X_VCMP_WORDSincheck.pyis the same formulas in plain Python.The same shader is a semantic fixture (
test_w64x_vcmp_fixture.py: hand-derived masks, popcounts and lowest lanes, a plain-Python model, and the translated shader run on 64 lanes in the wave interpreter). No translator change; it passed as it was.Tested
compute subgroup size: 64):run_gpu_tests.py --filter cs_w64x_vcmp430/430 words exact.LEONIDA_W64_EMULATE=1(--wave64-emulate, 32-wide subgroups): 430/430 words exact.s_bcnt1_i32_b64of a lane mask counting only the low word (RTX 5080 emulated: word 385 expected 0x3f, got 0x20).python -m unittest discover -s tests/semanticOK;python tests/semantic/regen_fixtures.py --checkclean;python -I tests/test_shader_checks.pyOK.Checklist
AI-assisted.