compute: accept VCC and EXEC in direct 64-bit s_not and s_cselect #3262
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3262"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T02:30:44Z.
Part of #2935 and #3224. Target branch
main. Rebased onmain0637fcednow that #3245 is merged: one commit.Change (
src/gfx1013_direct_compute.inl, thes_cselect_b64/s_not_b64block):s_not_b64ands_cselect_b64accept VCC (106) and EXEC (126) as 64-bit sources. Both words are read from the existing SALU register slots: VCC/VCC_HI and EXEC/EXEC_HI, in wave32 and wave64.s_not_b64may write EXEC. It uses the same pair of writes (dst,dst + 1) ass_bfm_b64in #3245 and thes_*_b64/s_*_saveexec_b64mask operations already onmain. The SCC write moves after the destination writes, with no behaviour change.s_mov_b64and the_b64mask operations onmainalready read it (operand32(106)pluspair_high, so 107). Ballot writers publish both words through the exchange. As onmainfor those operations, a VCC_HI that was never written is not refused in wave64; wave32 initialises it to 0.s_cselect_b64into EXEC.docs/experiments/native-salu64-ops.mdnow sayss_not_b64may write EXEC. It lists the VCC/EXEC sources and the new test command.Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, Release.
native_s_not_b64_exec_controlsand_hardwarereuse the #3245 fixture, in wave32 and wave64. They cover:main'scompile_dxilbefore this change, the controls stop at "invalid s_not_b64 source".tests/native_salu64_check.pyrefuseds_not_b64 s24, vcc. That control now uses EXEC_HI (127, odd), which stays refused.ctest -R "native_|startup_compute|compile_dxil|salu"passed 417 of 418 before the rebase.native_scalar_lds_hardwarefails as onmain. After the rebase on0637fced, thenative_s_not_b64_exec,native_salu,native_wave64_exec_salu,cselectandnative_direct_containertests pass, 22 of 22.Measured with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests, #3245 onmain7364e6a9against this change on that base. This was measured before #3245 was merged and not re-measured after the rebase. The merged #3245 has the same source and test changes (it adds docs only), butmainhas advanced 12 commits since7364e6a9, so only the differences below carry over, not the totals.v_rcp_f16;AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-28T03:26:19Z.
Review: COMMENTED
Review of head
0cc54d1c(the PR's own change is the same as1b58e0e1; the new head only merges currentmain). The dependency #3245 is merged.What I checked:
src/gfx1013_direct_compute.inl, thes_cselect_b64/s_not_b64block: both words of a VCC (106/107) or EXEC (126/127) source now come fromoperand32pluspair_high, the same reads thes_mov_b64and_b64mask operations already use. Odd SGPRs, M0 and the other special registers stay refused, and so doess_cselect_b64into EXEC.s_not_b64into EXEC writes both words through the samewrite(dst)/write(dst + 1)pair as the SAVEEXEC path; the SCC write after the destination writes is computed from the samelo | hi, so it is unchanged.pair_highas before the change.native_s_not_b64_exec_controls(wave32 and wave64 compiles, plus the odd SGPR / M0 / CSELECT-into-EXEC refusals) andnative_s_not_b64_exec_hardware(real D3D12 readback of both result words, SCC, the guard words, and which lanes store after NOT into EXEC). The expected words come from a plain 64-bit Python reference, not from the translator. Thenative_salu64_check.pycontrol moved from VCC (now accepted) to EXEC_HI (odd, still refused).Commands run:
python3 tests/docs_links_check.pyok,python3 tests/bidi_controls_check.pyok,git diff --check origin/main...HEADclean,python3 -m py_compileon both touched test files ok.-R '^native_(s_not_b64_exec_controls|s_not_b64_exec_hardware|salu64_controls|salu64_hardware|wave64_exec_salu_hardware|compute_clear|direct_container)$': dev 7/7 passed, release 7/7 passed.native_s_not_b64_exec_hardwarefails at wave32not_exec, word 520.s_not_b64writes SCC = 0):native_s_not_b64_exec_hardwarefails at wave32not_exec, word 776 (the SCC plane).No blocking findings. The receipt follows in a separate comment.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-28T03:26:20Z.
Win2025 WARP receipt for head
0cc54d1cafter updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
0cc54d1c63332718df6726de2c2515890c4ed757:--preset dev):cmake --build --preset dev --target compile_dxil native_store_replay -- -j 3):8.23s(configure0.00s)ctest --preset dev -R '^native_(s_not_b64_exec_controls|s_not_b64_exec_hardware|salu64_controls|salu64_hardware|wave64_exec_salu_hardware|compute_clear|direct_container)$' --parallel 4 --no-tests=error --output-on-failure): 7/7 passed (14.94s:native_salu64_controls0.26s,native_compute_clear0.40s,native_s_not_b64_exec_hardware1.80s,native_s_not_b64_exec_controls1.89s,native_salu64_hardware2.03s,native_wave64_exec_salu_hardware1.81s,native_direct_container14.28s)/O2(--preset release):cmake --build --preset release --target compile_dxil native_store_replay -- -j 3):30.68s(configure0.00s)ctest --preset release -R '^native_(s_not_b64_exec_controls|s_not_b64_exec_hardware|salu64_controls|salu64_hardware|wave64_exec_salu_hardware|compute_clear|direct_container)$' --parallel 4 --no-tests=error --output-on-failure): 7/7 passed (12.66s:native_salu64_controls0.17s,native_compute_clear0.26s,native_s_not_b64_exec_controls0.97s,native_s_not_b64_exec_hardware0.95s,native_salu64_hardware1.16s,native_wave64_exec_salu_hardware0.97s,native_direct_container12.22s)sccache: 1/8 hits; wall48.6stested:
0cc54d1cvia fetch (pull/3262/head, no patch)The new tests
native_s_not_b64_exec_controlsandnative_s_not_b64_exec_hardware(on WARP, not skipped) and the changednative_salu64_controlsran in both legs.AI-assisted; commands listed were executed locally.