shader: lower s_cmov_b32, s_cmov_b64, and s_cmovk_i32 #1649
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1649
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1649"
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?
@geiyiliyabumo on GitHub · 2026-11-24 20:27 UTC · original
geiyiliyabumo:fix/shader-scalar-cmov→main· +159 −1 · 2 files · 1 commits · openSummary
s_cmov_b32(SOP1 0x005),s_cmov_b64(SOP1 0x006), ands_cmovk_i32(SOPK 0x002) incrates/victory-shader/src/emit/lower.rs.ir.rs(lines 707–719) andresource.rs(lines 945–977) already tracked old destination reads,SCCinputs, and non-SCC-clobbering semantics for all three instructions; this completes the DXIL lowering side:s_cmov_b64selects each 32-bit half independently (SCC ? src0[h] : old_dst[h]), including sign-extended inline constants andnulldestination handling, without requiringINT64(SFI0 & 0x8000 == 0).s_cmov_b32ands_cmovk_i32selectSCC ? new : old_dst(sign-extendingsimm16fors_cmovk_i32) and leaveSCCuntouched.Verification
cargo test -p victory-shader --lib: full unit suite +scalar_cmov_updates_only_when_scc_is_setPASS on both AMD Radeon RX 9060 XT (D3D12 hardware) and Microsoft Basic Render Driver (WARP), coveringSCC=0preservation,SCC=1overwrite, preservedSCCafter moving0, positive/negativesimm16sign-extension, 64-bit register pairs, inline-1sign-extension into high dword, andSFI0 & 0x8000 == 0.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: pass (154 files).AI-assisted; synthetic tests only, no game files.
@Marvisak on GitHub · 2026-11-25 01:33 UTC · original · edited 2026-11-25 22:25 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main:mainhas moved since the last triage, and the branch now conflicts incrates/victory-shader/src/emit/valu_tests.rs. It will be reviewed again once it is rebased onto currentmain.Previous verdict for this head: merge candidate.
Generated by Claude Code
@Headache3318 on GitHub · 2026-11-25 01:37 UTC · original
Tested on Linux (Arch, kernel 7.3.5, 3× RTX 4090 driver 620.73.04), Rust 1.98.1 (pinned). PR head
3668245applied cleanly onto currentmainccfb029.cargo test -p victory-shader --locked: 96 passed, 0 failed, 1 ignored. All tests pass.cargo clippy -p victory-shader --all-targets -- -D warnings: 2 pre-existing unused-import errors in test code (fail identically on mainccfb029). The PR introduces no new clippy warnings.Not tested: Windows MSVC build, the title itself. AI-assisted.
@geiyiliyabumo on GitHub · 2026-11-25 02:24 UTC · original
Rebased cleanly onto \main\ (\
ccfb029). \cargo test -p victory-shader --locked scalar_cmov\ (verified on physical AMD RX 9060 XT + WARP + Microsoft \dxil.dll), \cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings, and \cargo xtask policy\ all pass.@StExpeditus on GitHub · 2026-11-25 09:07 UTC · original
Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at
1041a12.cargo test --workspace --locked --no-fail-fast-> 694 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.