CLI: replay selected runtime shader hashes in offline translation #1114

Open
github-bot wants to merge 4 commits from github-bot/gh-1114 into main AGit
Owner

@⁠Razdva122 on GitHub · 2026-11-24 15:49 UTC · original
Razdva122:cli/translation-diagnostics → main · +275 −19 · 7 files · 4 commits · open

GPU reports such as #1062 identify a failing pipeline by a 16-digit shader hash. This adds an exact hash filter to the offline translator, so someone with a local archive can replay the named shaders and see the source locations and translation outcomes.

victory translate path/to/archive --shader-hash 0123456789abcdef --list --validate

The command accepts repeated options or comma-separated hashes. It scans raw DXBC containers and compressed SGD5 records, then runs translation and optional validation/pipeline checks for the matches. It reports all missing requests after printing the matches. Scanning and decompression are still necessary. The full-cache warm-up mode rejects the hash filter.

The runtime hashes the supplied bytecode length. The scan tests the declared DXBC extent and, when available, the complete standalone file or unpacked record, which can include padding. At an interior raw file offset, only the declared extent is known.

PR #378 adds hashes to full listings. This contribution targets replay of known hashes and leaves the unfiltered census behavior intact. In-process tests exercise the CLI parser, scanner, translator and missing-hash check with synthetic inputs. They cover padded bytecode, identical DXIL in different containers, duplicates, malformed hashes and missing matches. The tests use the existing workspace dependencies.

An independent tester found and validated all 21 hashes from a live WARP startup on the earlier revision 89f3d3c using the archive and executable together. Test report

AI-assisted with Codex.

Windows CI passed both workspace Clippy configurations and the full workspace test suite at 10c92dc. Windows job

**@⁠Razdva122** on GitHub · 2026-11-24 15:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/1114) `Razdva122:cli/translation-diagnostics` → `main` · +275 −19 · 7 files · 4 commits · open GPU reports such as #1062 identify a failing pipeline by a 16-digit shader hash. This adds an exact hash filter to the offline translator, so someone with a local archive can replay the named shaders and see the source locations and translation outcomes. ```text victory translate path/to/archive --shader-hash 0123456789abcdef --list --validate ``` The command accepts repeated options or comma-separated hashes. It scans raw DXBC containers and compressed SGD5 records, then runs translation and optional validation/pipeline checks for the matches. It reports all missing requests after printing the matches. Scanning and decompression are still necessary. The full-cache warm-up mode rejects the hash filter. The runtime hashes the supplied bytecode length. The scan tests the declared DXBC extent and, when available, the complete standalone file or unpacked record, which can include padding. At an interior raw file offset, only the declared extent is known. PR #378 adds hashes to full listings. This contribution targets replay of known hashes and leaves the unfiltered census behavior intact. In-process tests exercise the CLI parser, scanner, translator and missing-hash check with synthetic inputs. They cover padded bytecode, identical DXIL in different containers, duplicates, malformed hashes and missing matches. The tests use the existing workspace dependencies. An independent tester found and validated all 21 hashes from a live WARP startup on the earlier revision `89f3d3c` using the archive and executable together. [Test report](https://git.gtahub.st/github/Marvisak--VIctory/pulls/1114) AI-assisted with Codex. Windows CI passed both workspace Clippy configurations and the full workspace test suite at `10c92dc`. [Windows job](https://github.com/Marvisak/VIctory/actions/runs/45819247420/job/139906891783)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:20:25 +00:00
Author
Owner

@⁠SkillIssueXO on GitHub · 2026-11-24 16:13 UTC · original

Verified with the Xbox Series X 1.0.2.1 title on Windows 11 using PR head 89f3d3c and the SDK’s dxil.dll 1.9.2602.17.

  • I took 21 unique first bind hashes from a live WARP startup on main ffe310e. translate --shader-hash … --list --validate found 19 in shaders.rpf. Adding game_scarlett_master.exe recovered both remaining hashes, 06295fb1d1aefb78 and dfafaf385b2f94e8. All 21 validated (18 vertex/pixel, 3 compute). The archive-only run returned exit 1 and listed those two misses. The expanded input returned exit 0.
  • The four culling hashes from #71 (fdd56d97a806bcca, 17af15c4015cb4b6, 55679a0547649d0b, 89d08e561897d4e5) and both hashes from #1119 (535f8a954d8ec638, eb47e845b2cb0eba) all matched in shaders.rpf. All six are compute. DXIL emission stopped on unknown structured-buffer stride for five, and on an untracked select mask for eb47e845b2cb0eba. The per-hash locations and outcomes agreed between --jobs 1 and --jobs 8. Adding a deliberately absent hash kept the six results and returned exit 1 for that hash.

This verifies the replay and input coverage against the title. DXIL validation was offline. AI-assisted (Codex).

**@⁠SkillIssueXO** on GitHub · 2026-11-24 16:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/1114#issuecomment-7137330469) **Verified with the Xbox Series X 1.0.2.1 title on Windows 11** using PR head `89f3d3c` and the SDK’s `dxil.dll` `1.9.2602.17`. - I took 21 unique `first bind` hashes from a live WARP startup on `main` `ffe310e`. `translate --shader-hash … --list --validate` found 19 in `shaders.rpf`. Adding `game_scarlett_master.exe` recovered both remaining hashes, `06295fb1d1aefb78` and `dfafaf385b2f94e8`. All 21 validated (18 vertex/pixel, 3 compute). The archive-only run returned exit 1 and listed those two misses. The expanded input returned exit 0. - The four culling hashes from #71 (`fdd56d97a806bcca`, `17af15c4015cb4b6`, `55679a0547649d0b`, `89d08e561897d4e5`) and both hashes from #1119 (`535f8a954d8ec638`, `eb47e845b2cb0eba`) all matched in `shaders.rpf`. All six are compute. DXIL emission stopped on unknown structured-buffer stride for five, and on an untracked select mask for `eb47e845b2cb0eba`. The per-hash locations and outcomes agreed between `--jobs 1` and `--jobs 8`. Adding a deliberately absent hash kept the six results and returned exit 1 for that hash. This verifies the replay and input coverage against the title. DXIL validation was offline. AI-assisted (Codex).
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:01 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 89f3d3c: cargo test -p victory -p victory-shader passes, 125 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 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1114#issuecomment-7140052043) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 89f3d3c: `cargo test -p victory -p victory-shader` passes, 125 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 00:35 UTC · original · edited 2026-11-25 22:28 UTC

Automated triage for the maintainers.

Needs rebase. This PR no longer merges cleanly into main: main has moved since the last triage, and the branch now conflicts in README.md and apps/victory/src/main.rs. It will be reviewed again once it is rebased onto current main.

Previous verdict for this head: merge candidate.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/1114#issuecomment-7148674082) · edited 2026-11-25 22:28 UTC <!-- victory-triage v1 head=651cc2ac1a3563bc691f5a782b3b5434647f97f9 verdict=needs-rebase at=2026-11-25T22:32:00Z --> Automated triage for the maintainers. **Needs rebase.** This PR no longer merges cleanly into `main`: `main` has moved since the last triage, and the branch now conflicts in `README.md` and `apps/victory/src/main.rs`. It will be reviewed again once it is rebased onto current `main`. Previous verdict for this head: merge candidate. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Razdva122 on GitHub · 2026-11-25 06:55 UTC · original

@⁠Marvisak, could you re-review 651cc2a and update the triage: needs work label if this addresses the earlier review?

The CLI tests now exercise the parser, scanner and translator in process. The dependency manifests and lockfile match main, and the README example takes three lines. Both Clippy configurations and the full workspace test suite passed on Windows. Changes since triage · Windows CI

**@⁠Razdva122** on GitHub · 2026-11-25 06:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/1114#issuecomment-7155304689) @⁠Marvisak, could you re-review `651cc2a` and update the `triage: needs work` label if this addresses the earlier review? The CLI tests now exercise the parser, scanner and translator in process. The dependency manifests and lockfile match main, and the README example takes three lines. Both Clippy configurations and the full workspace test suite passed on Windows. [Changes since triage](https://github.com/Marvisak/VIctory/compare/f8259a9311915651416f7b1083b7d3762b3ae09c...651cc2ac1a3563bc691f5a782b3b5434647f97f9) · [Windows CI](https://github.com/Razdva122/VIctory/actions/runs/45563398704/job/139032272079)
github-bot force-pushed github-bot/gh-1114 from 651cc2ac1a to 352bf0873e 2026-11-26 12:19:31 +00:00 Compare
Author
Owner

@⁠Razdva122 on GitHub · 2026-11-26 12:28 UTC · original

Could you re-review the shader replay change at 10c92dc and refresh the rebase label? The branch now merges cleanly with main at 63bcca4. The rebase keeps the new nonzero worker-count check, and the two shader fixtures added on main now supply the declared length of an empty DXBC header. Both Clippy configurations and the full workspace suite passed on Windows. CI results

**@⁠Razdva122** on GitHub · 2026-11-26 12:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1114#issuecomment-7192047921) Could you re-review the shader replay change at `10c92dc` and refresh the rebase label? The branch now merges cleanly with `main` at `63bcca4`. The rebase keeps the new nonzero worker-count check, and the two shader fixtures added on main now supply the declared length of an empty DXBC header. Both Clippy configurations and the full workspace suite passed on Windows. [CI results](https://github.com/Marvisak/VIctory/actions/runs/45819247420/job/139906891783)
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1114/head:github-bot/gh-1114'
git switch 'github-bot/gh-1114'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1114'
git switch 'github-bot/gh-1114'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1114'
git switch 'github-bot/gh-1114'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1114'
git switch 'main'
git merge --squash 'github-bot/gh-1114'
git switch 'main'
git merge --ff-only 'github-bot/gh-1114'
git switch 'main'
git merge 'github-bot/gh-1114'
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!1114
No description provided.