Improve shader mask handling and GPU diagnostics #1227

Open
github-bot wants to merge 24 commits from github-bot/gh-1227 into main AGit
Owner

@⁠chiragmadhuprasad on GitHub · 2026-11-24 16:35 UTC · original
chiragmadhuprasad:test/lane-mask-joins → main · +527 −56 · 11 files · 24 commits · open

Summary

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.

**@⁠chiragmadhuprasad** on GitHub · 2026-11-24 16:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1227) `chiragmadhuprasad:test/lane-mask-joins` → `main` · +527 −56 · 11 files · 24 commits · open Summary 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]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:24:20 +00:00
Author
Owner

@⁠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-shader passes, 170 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 17:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1227#issuecomment-7140004606) 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-shader` passes, 170 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠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 current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/1227#issuecomment-7149430313) <!-- victory-triage v1 head=c3beb4a2628b4f50bc8a02de9616e7f027ef9185 verdict=needs-rebase at=2026-11-25T01:19:25Z --> 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 current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • 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/resource.rs
  • crates/victory-gpu/src/shadow.rs
  • crates/victory-shader/src/emit/lower.rs
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.
git fetch -u origin '+refs/pull/1227/head:github-bot/gh-1227'
git switch 'github-bot/gh-1227'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1227'
git switch 'github-bot/gh-1227'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1227'
git switch 'github-bot/gh-1227'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1227'
git switch 'main'
git merge --squash 'github-bot/gh-1227'
git switch 'main'
git merge --ff-only 'github-bot/gh-1227'
git switch 'main'
git merge 'github-bot/gh-1227'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1227
No description provided.