Translate scalar conditional moves (s_cmov_b32, s_cmov_b64, s_cmovk_i32) #3389
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3389
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3389"
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?
@xiepeixuan on GitHub · 2026-11-29 22:42 UTC · original
xiepeixuan:auto/s-cmovk-i32→main· +151 −2 · 3 files · 5 commits · openNo issue in this repo. Related upstream: Marvisak/VIctory#91, #1649.
What it changes
The RDNA 2 ISA, §§5.5, 12.2 and 12.3 specifies that these moves read SCC without writing it: when SCC is set, copy the source (sign-extend the immediate for
s_cmovk_i32); otherwise, keep the old destination.s_cmov_b32ands_cmovk_i32each emit one i32select.s_cmov_b64emits one per dword, using the same SCC and sign-extending negative inline integers into the high dword. This matchesfold.rs's split into two b32 moves. No branch, wave operation, or DXILINT64requirement is added. The decoder, IR, resource tracing, fold logic, and cache settings are unchanged.Design follows Marvisak/VIctory#1649 by geiyiliyabumo. See #1649 and tedin7's related #91.
Expected effect on NVIDIA
Tier A — shader refusal. A shader that uses one of these scalar move results can now translate instead of dropping its draw or dispatch. This is reproduced with synthetic shaders. No in-game frequency or visual effect was measured.
How it was tested
-2for b64, and immediate-17for cmovk.41adb55167fa778fcaa5dc36fa18a1fa8dacd657plus tests only (da0ac9b687e0570181fba499630d8221ea0b96f6): all four failed withUnsupportedon Linux and Windows, exit 101.9d0a44ad5b5a38441c0b6948f26131d6ea9955d6: all four passed. Linux suite: 295 → 299 passed, 0 failed, 2 ignored. Windows suite: 457 → 461 passed, with the same five device-availability failures and nine ignored on both. Excluding only those five: 461 passed, 0 failed. Windowscargo check --workspace --lockedpassed at both SHAs.Checked for overlap
AI-assisted (Codex). Not run in the game.
Translate scalar conditional moves with immediatesto Translate scalar conditional moves (s_cmov_b32, s_cmov_b64, s_cmovk_i32)@nick0451 on GitHub · 2026-11-30 01:51 UTC · original
Exact translation check, with no game run: the title's shaders (game folder: 26,599 containers, 26,180 programs, 25,789 with emitted DXIL hashes),
victory translate --listwithVICTORY_HOST_WAVE=32, main41adb551(v2026.11.29.05) against this PR merged onto it.Result: the output is the same for every program. All 25,789 output hashes match main, nothing fails to translate, and the summary counts are unchanged. So this title doesn't hit the pattern this PR changes, and the PR changes nothing for it, which also means no risk of a regression there. The fix may still matter for other titles or for the hand-written cases in the PR's tests.
(RTX 3090 host. The listing doesn't depend on the card, only on
VICTORY_HOST_WAVE.)🤖 Generated with Claude Code
@dyshay on GitHub · 2026-11-30 03:12 UTC · original
Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch
janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with--profile diag --features diagnostics. A run on an RTX 4090 is queued (Series S with ray tracing, DLSS Quality). Frame times will follow here.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.