Improve shader mask handling and GPU diagnostics #1227
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!1227
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1227"
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?
@chiragmadhuprasad on GitHub · 2026-11-24 16:35 UTC · original
chiragmadhuprasad:test/lane-mask-joins→main· +527 −56 · 11 files · 24 commits · openSummary
This contribution contains three improvements:
Shader handling: Improve mask handling at data joins and support s_bcnt1 SCC mask behaviour.
GPU diagnostics: Improve shadow-buffer allocation diagnostic messages.
Documentation: Add experimental compatibility investigation results and D3D12 debugging notes.
Testing
The following checks completed successfully:
cargo test -p victory-shader
cargo test --workspace
cargo build --release --workspace --features victory-gpu/diagnostics,victory-core/diagnostics
Compatibility investigation
The documentation records experimental GTA VI compatibility research, including shader translation results and D3D12 runtime observations.
These findings do not establish that the game is playable.
Notes
The shader changes include a cherry-picked contribution. Original authorship is preserved in the commit history.
Further review and testing by VIctory maintainers would be appreciated.
Outside compute a lane mask has no number form, and two patterns made programs fail with "a lane mask read as data" although no lane mask is read as a number: - A join of registers that hold a mask's dword on one edge and data on another (the compiler reuses them once the mask is dead; in mesh programs, s_cselect_b64 s[8:9], exec, 0 on one path and s_buffer_load_dword s9 on the other). The data phi now takes undef on the mask's edge. - s_bcnt1_i32_b64 (b32 in wave32) of a mask whose count is dead and wgit update-ref -d CHERRY_PICK_HEADhose SCC ("some lane is set") picks a branch, as in s_xor_b64 s[12:13], vcc, exec; s_bcnt1_i32_b64 s12, s[12:13]; s_cbranch_scc1. The lane pass now takes that SCC per lane, as for the mask operations themselves. Co-Authored-By: Claude Opus 5.5 <[email protected]>@Zipettte on GitHub · 2026-11-24 17:59 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
13b1beb:cargo test -p victory-gpu -p victory-shaderpasses, 170 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 01:19 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-gpu/src/copystat.rs,crates/victory-gpu/src/descriptor/host.rs,crates/victory-gpu/src/draw.rs,crates/victory-gpu/src/host.rs,crates/victory-gpu/src/shadow.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
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.