victory translate --hashes and translate-diff: compare two builds' emitted DXIL program by program #817

Open
github-bot wants to merge 1 commit from github-bot/gh-817 into main AGit
Owner

@⁠JRamos1993 on GitHub · 2026-11-25 08:40 UTC · original
JRamos1993:translate-hashes → main · +320 −3 · 4 files · 1 commits · open

Why

victory translate --validate reports how many programs validate, not which ones change. A PR can keep that count and still change the code of thousands of programs, or gain some and lose others.

I compared PRs this way tonight with a local patch, and it caught things the count alone hides:

  • #713 loses 1,289 programs that validate on main: #713
  • #716 changes the DXIL of 17,346 programs without gaining or losing any: #716
  • #215's 59 changed programs turned out to be only re-encoded: #215
  • #722's 22 programs are a subset of #699's 142: #699

This PR makes that check part of the tool, so anyone with the pack can run it.

What

  • victory translate --hashes (implies --list): each emitted program's line names dxil= and 16 hex digits of the BLAKE3 of its DXIL container, taken before the validator signs it.

    • Without --validate or --pipelines, an emitted program gets an emitted line to carry the hash.
    • Lines still end in their outcome ( validated, pipeline created, a reason), so existing greps keep working.
  • victory translate-diff <old list> <new list> [--keys]: compares two such lists by program (container hash and stage). It prints:

    • gained: programs the new list validates and the old does not, grouped by the old list's reason, with numbers left out so one kind of stop is one group;
    • lost: the reverse, grouped by the new list's reason;
    • DXIL changed: programs both validate whose hashes differ, when both lists were made with --hashes.

    --keys names the programs under each group. It reads only the two text files, so no GPU or pack is needed for the diff itself.

  • README: the two commands in the command list.

Example: main 9376fd6 against main with #699 merged. Both lists come from translate --validate --hashes over the retail pack; the output has no title data without --keys.

old          25889 programs, 25420 validated
new          25889 programs, 25562 validated
gained       (validated in the new list only; the old list's reason) 142
       39  validator: error: Container part 'Program Output Signature' does not match expected for module.
       39  validator: error: signature element TEXCOORD at location (#,#) size (#,#) has interpolation mode that differs …
       33  validator: error: Container part 'Program Input Signature' does not match expected for module.
       14  validator: error: signature element NORMAL at location (#,#) size (#,#) has interpolation mode that differs …
       11  validator: error: signature element SV_IsFrontFace at location (#,#) size (#,#) has interpolation mode …
        6  validator: error: signature element COLOR at location (#,#) size (#,#) has interpolation mode that differs …
lost         (validated in the old list only; the new list's reason) 0
DXIL changed 0 of the 25420 programs both validate (both lists with --hashes)

Tested

RTX 5090, Windows 11, main 9376fd6.

  • Deterministic: two translate --validate --hashes runs of this branch over the retail pack, then translate-diff: 0 gained, 0 lost, 0 of 25,420 changed.
  • Sensitive: the same hashes from 2119b0e against 310c6eb (with my local equivalent) differed for 8,514 programs.
  • The example above: this branch with #699 merged.
  • Unit tests: 4 new tests in translate_diff.
    • List lines: with and without a hash, a stop with an address, a validator message that has double spaces in it, summaries and duplicates.
    • Gains and losses grouped by reason; reasons that differ only in numbers forming one group; changed DXIL; nothing compared when a list has no hashes.
    • cargo test -p victory --locked: 5 passed, 0 failed.
  • Clippy: cargo clippy -p victory --all-targets --locked, with and without --all-features, gives no warnings in apps/victory.
    • With -D warnings, clippy stops earlier in victory-gpu on main itself (placed_filler_twins unused, sort_unstable_by_key in draw.rs, depth_written never read), files this PR does not touch.

Not tested

  • Lists made by an older victory (no dxil=): they compare for gains and losses, and the DXIL part says it needs --hashes.
  • Programs that appear twice with the same container hash and stage: the first line counts.

AI use

Claude Code with Claude Opus 5.5 wrote the change and the tests, ran the pack and wrote this description. The tests use synthetic list lines; nothing from the title is in the PR.

**@⁠JRamos1993** on GitHub · 2026-11-25 08:40 UTC · [original](https://github.com/fxceless/victory-fork/pull/817) `JRamos1993:translate-hashes` → `main` · +320 −3 · 4 files · 1 commits · open ## Why `victory translate --validate` reports how many programs validate, not which ones change. A PR can keep that count and still change the code of thousands of programs, or gain some and lose others. I compared PRs this way tonight with a local patch, and it caught things the count alone hides: - **#713 loses 1,289 programs** that validate on `main`: https://git.gtahub.st/github/fxceless--victory-fork/pulls/713 - **#716 changes the DXIL of 17,346 programs** without gaining or losing any: https://git.gtahub.st/github/fxceless--victory-fork/pulls/716 - **#215's 59 changed programs** turned out to be only re-encoded: https://git.gtahub.st/github/fxceless--victory-fork/pulls/215 - **#722's 22 programs are a subset of #699's 142**: https://git.gtahub.st/github/fxceless--victory-fork/pulls/699 This PR makes that check part of the tool, so anyone with the pack can run it. ## What - **`victory translate --hashes`** (implies `--list`): each emitted program's line names `dxil=` and 16 hex digits of the BLAKE3 of its DXIL container, taken before the validator signs it. - Without `--validate` or `--pipelines`, an emitted program gets an `emitted` line to carry the hash. - Lines still end in their outcome (` validated`, ` pipeline created`, a reason), so existing greps keep working. - **`victory translate-diff <old list> <new list> [--keys]`**: compares two such lists by program (container hash and stage). It prints: - **gained:** programs the new list validates and the old does not, grouped by the old list's reason, with numbers left out so one kind of stop is one group; - **lost:** the reverse, grouped by the new list's reason; - **DXIL changed:** programs both validate whose hashes differ, when both lists were made with `--hashes`. `--keys` names the programs under each group. It reads only the two text files, so no GPU or pack is needed for the diff itself. - **README:** the two commands in the command list. **Example:** `main` `9376fd6` against `main` with #699 merged. Both lists come from `translate --validate --hashes` over the retail pack; the output has no title data without `--keys`. ``` old 25889 programs, 25420 validated new 25889 programs, 25562 validated gained (validated in the new list only; the old list's reason) 142 39 validator: error: Container part 'Program Output Signature' does not match expected for module. 39 validator: error: signature element TEXCOORD at location (#,#) size (#,#) has interpolation mode that differs … 33 validator: error: Container part 'Program Input Signature' does not match expected for module. 14 validator: error: signature element NORMAL at location (#,#) size (#,#) has interpolation mode that differs … 11 validator: error: signature element SV_IsFrontFace at location (#,#) size (#,#) has interpolation mode … 6 validator: error: signature element COLOR at location (#,#) size (#,#) has interpolation mode that differs … lost (validated in the old list only; the new list's reason) 0 DXIL changed 0 of the 25420 programs both validate (both lists with --hashes) ``` ## Tested RTX 5090, Windows 11, `main` `9376fd6`. - **Deterministic:** two `translate --validate --hashes` runs of this branch over the retail pack, then `translate-diff`: 0 gained, 0 lost, 0 of 25,420 changed. - **Sensitive:** the same hashes from `2119b0e` against `310c6eb` (with my local equivalent) differed for 8,514 programs. - **The example above:** this branch with #699 merged. - **Unit tests:** 4 new tests in `translate_diff`. - List lines: with and without a hash, a stop with an address, a validator message that has double spaces in it, summaries and duplicates. - Gains and losses grouped by reason; reasons that differ only in numbers forming one group; changed DXIL; nothing compared when a list has no hashes. - `cargo test -p victory --locked`: 5 passed, 0 failed. - **Clippy:** `cargo clippy -p victory --all-targets --locked`, with and without `--all-features`, gives no warnings in `apps/victory`. - With `-D warnings`, clippy stops earlier in `victory-gpu` on `main` itself (`placed_filler_twins` unused, `sort_unstable_by_key` in `draw.rs`, `depth_written` never read), files this PR does not touch. ## Not tested - Lists made by an older `victory` (no `dxil=`): they compare for gains and losses, and the DXIL part says it needs `--hashes`. - Programs that appear twice with the same container hash and stage: the first line counts. ## AI use Claude Code with Claude Opus 5.5 wrote the change and the tests, ran the pack and wrote this description. The tests use synthetic list lines; nothing from the title is in the PR.
`translate --validate` says how many programs validate, not which ones
change. A PR can keep the count and still change (or break) the code of
thousands of programs, or gain some and lose others.

- `translate --hashes` (implies `--list`): each emitted program's line
  names `dxil=` and 16 hex digits of the BLAKE3 of its DXIL container,
  taken before the validator signs it. Without `--validate` or
  `--pipelines`, an emitted program gets an `emitted` line to carry it.
- `victory translate-diff <old> <new> [--keys]`: two such lists compared
  by program (container hash and stage). It prints the programs one
  validates and the other does not, grouped by the other list's reason
  (numbers left out, so one kind of stop is one group), and the programs
  both validate whose DXIL differs. `--keys` names them.

Tests: list lines (with and without a hash, stops with an address,
validator text with double spaces, summaries and duplicates), gains and
losses by reason, reasons grouped without their numbers, changed DXIL.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:51:48 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 10:12 UTC · original

Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head eb721c4 into main 9376fd6 in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with exactly the errors main itself has on this machine (placed_filler_twins never used, depth_written never read, in victory-gpu); with --all-features it fails with the same number of errors as main (4). This PR adds none and removes none. cargo test --workspace --locked: 544 passed, 0 failed, 10 ignored, two runs (main alone: 540 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-25 10:12 UTC · [original](https://github.com/fxceless/victory-fork/pull/817#issuecomment-7159388543) Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `eb721c4` into `main` `9376fd6` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with exactly the errors `main` itself has on this machine (`placed_filler_twins` never used, `depth_written` never read, in `victory-gpu`); with `--all-features` it fails with the same number of errors as `main` (4). This PR adds none and removes none. `cargo test --workspace --locked`: 544 passed, 0 failed, 10 ignored, two runs (`main` alone: 540 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/817/head:github-bot/gh-817'
git switch 'github-bot/gh-817'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-817'
git switch 'github-bot/gh-817'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-817'
git switch 'github-bot/gh-817'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-817'
git switch 'main'
git merge --squash 'github-bot/gh-817'
git switch 'main'
git merge --ff-only 'github-bot/gh-817'
git switch 'main'
git merge 'github-bot/gh-817'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.