Shaders: a select or carry-in on an untracked mask tests this lane's bit #1084
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!1084
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1084"
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?
@undeadhuman37 on GitHub · 2026-11-24 15:36 UTC · original
undeadhuman37:fix/untracked-mask-select→main· +99 −18 · 2 files · 1 commits · openv_cndmask_b32andv_*_co_ci_u32were refused when their scalar mask was not one thatstructurefollows (a plain SGPR number). In compute with console lanes, the lane now tests its own bit of the register (the pair in wave64); inline 0 and -1 masks are constants.Credit: this is taken from #585 (the mask part only). Its descriptor-dimension hunk is left out; that belongs with the resource work. It overlaps #585, so whichever merges first, the other should drop this hunk.
Measured offline over the shader corpus (26148 programs):
Tests: a synthetic hardware test fails before the change and passes after (run earlier on a GPU, not re-run for this PR). WARP cannot pin a wave size, so the test skips it.
cargo clippy -p victory-shader --all-targets -- -D warningsis clean on this rebase.No game data. AI-assisted: written with Claude Code (Claude Sonnet 5.5).
🤖 Generated with Claude Code
@jeremygold02 on GitHub · 2026-11-24 16:28 UTC · original
I replayed 105 distinct compute shaders that VIctory had refused during one local RTX 5070 mission-loading trace, after a fence-confirmed texture readback. I matched the local inputs to the logged identifiers and compared the same inputs on
ffe310eand48a41fb. The replay ran the translator offline on Windows.On main, 47 of the 105 stopped at the untracked-mask select. All 47 advanced on this PR. Their next reported reasons were:
Both builds still refused all 105 inputs before producing DXIL. This confirms the specific lowering change reaches this mission’s shaders and identifies which refusal appears next. The replay did not execute any of these shaders or measure frame time. AI-assisted.
@Zipettte on GitHub · 2026-11-24 16:29 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
48a41fb:cargo test -p victory-shaderpasses, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@jtrudeau1530 on GitHub · 2026-11-24 17:14 UTC · original
Tested a local adaptation of
48a41fbtogether with #660 on an RX 7900 XT under Wine/vkd3d-proton. The adaptation reads the wave64 high word from the consuming instruction, requires it before the tracked-mask shortcut, and uses the exact low/high pair for that shortcut. Missing high-word metadata remains refused rather than becoming zero.Synthetic GPU readbacks pass for all 128 threads with native wave32 and wave64 for
v_cndmask_b32,v_add_co_ci_u32,v_sub_co_ci_u32, andv_subrev_co_ci_u32. The tests use unequal low/high words, rewrite only the high word between two uses, and cover inline 0/-1, root-driven uniforms_cselect, and tracked compares. Numeric masks alone must enable WAVE_OPS and pin the native wave size; no indexing instruction accidentally enables that path. Microsoft DXIL validation is mandatory. The same all-lane fixture on the unchanged parent fails at the original untracked-mask refusal.Missing-high, rewritten-mask and divergent-carry negatives also remain refused. The latter now propagates the existing lane-mask-as-data refusal at the consuming store; its assertion checks the exact Unsupported location and reason. Hardware tests are explicitly invoked and fail if the physical adapter or validator is unavailable. This is compute-path validation of the adaptation, not a game-rendering or frame-time result, and does not resolve the later refusal groups reported above.
@justlovett0 on GitHub · 2026-11-24 18:48 UTC · original
Verified + integrated, with a runtime caveat. Stack: main
ffe310e+ #175/#994/#747/#302/#193/#704/#309/#953/#1067/#986/#1260/#1267/#1254/#1276/#189 (wave64 emulation), RTX 3080 10 GB / Win10 21H2 (19044.7846) / driver 621.24 (32.0.16.2124). Re-census of captured runtime containers; world stable ~9 min, 0 device removals.Merged cleanly. Note: the offline untracked-mask gain did not transfer to our captured runtime containers — the "a lane mask read as data" (7) and "a lane mask holding lanes elsewhere read as data" (6) classes persist on the runtime "Wrapped" containers. The fix works on the offline archive; our runtime masks differ (likely loaded from memory rather than the spill/select patterns). Flagging so the offline count isn't read as a runtime guarantee.
AI use: Qwen Code; local measurements. No game data posted.
@Marvisak on GitHub · 2026-11-25 00:34 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-shader/src/emit/lower.rs,crates/victory-shader/src/emit/valu_tests.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
@kais7654 on GitHub · 2026-11-25 15:30 UTC · original
Picking this up: rebased your commit
48a41fbonto current main (940d32f),authorship preserved — https://github.com/Marvisak/VIctory/compare/main...kais7654:VIctory:shader/untracked-mask-lane-bit
The merge conflicts were with the stride-heap and lane-detection work
that landed since; I resolved them along the lines discussed above
(
lane_bitsetsWAVE_OPSitself, so the mask path needs no separateflag), and the test now runs through main's single-threaded GPU harness.
Clippy clean with -D warnings; the mask test passes on hardware.
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.