Repository navigation
compute: accept VCC and EXEC in direct 64-bit s_not and s_cselect - #3262
Merged
Merged
Conversation
s_not_b64 and s_cselect_b64 now take VCC and EXEC as 64-bit sources in direct compute, reading both words from the existing SALU register slots (VCC_HI, EXEC_HI), and s_not_b64 may write EXEC through the same pair of writes the other 64-bit SALU mask operations use. s_not_b64 writes SCC after its destination. Odd SGPRs, M0 and other special registers stay refused, as does s_cselect_b64 into EXEC. New test native_s_not_b64_exec (controls, hardware) covers NOT from EXEC and VCC, CSELECT under SCC 0 and 1, and NOT into EXEC with a per-lane store, in wave32 and wave64. native_salu64_controls refused s_not_b64 from VCC; that control now uses EXEC_HI (127), which stays refused.
Leyukaka
force-pushed
the
s-not-b64-exec
branch
from
November 28, 2026 03:10
794d168 to
1b58e0e
Compare
tedin7
reviewed
Nov 28, 2026
tedin7
left a comment
Collaborator
There was a problem hiding this comment.
Review of head 0cc54d1c (the PR's own change is the same as 1b58e0e1; the new head only merges current main). 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.- Inline constants and the literal go through the same
pair_highas before the change. - Tests:
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:
- Linux:
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. - Windows Server 2025, D3D12 WARP 1.0.22 (the hardware test ran on WARP, it did not skip),
-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. - Mutation 1 (the high word of a 64-bit source read from the low word, in this block only):
native_s_not_b64_exec_hardwarefails at wave32not_exec, word 520. - Mutation 2 (
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.
Collaborator
|
Win2025 WARP receipt for head 0cc54d1 after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
The new tests AI-assisted; commands listed were executed locally. |
lambirou
added a commit
to lambirou/Xbox2Windows
that referenced
this pull request
Nov 28, 2026
Absorb R0Y00#3262's scalar64 source validation for s_cselect_b64 and s_not_b64, including VCC and EXEC sources, while keeping the branch's direct-compute paths.
tedin7
added a commit
to tedin7/Xbox2Windows
that referenced
this pull request
Nov 28, 2026
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 compute: accept EXEC as a 64-bit scalar operand in direct compute #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 compute: accept EXEC as a 64-bit scalar operand in direct compute #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.