Distinguish shader signatures in offline translation #881
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/882"
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?
Imported from fxceless/victory-fork. Originally posted by Lkxex on 2026-11-25T11:41:06Z.
Problem
victory translatecurrently deduplicates containers using only the DXIL part. Shader emission also reads the input, output and per-primitive signatures (ISG1,OSG1,PSG1) and pipeline validation info (PSV0). Two containers can share DXIL while requiring different emission or validation results. The scan currently skips the second container as a duplicate.Fix
Include the parts consumed by the emitter in the deduplication key. Exact repeats and containers that only differ in unrelated parts still share one translation. The short code hash displayed in diagnostic output stays the same.
Validation
cargo test --locked -p victoryandgit diff --checkpassed.AI-assisted change. Validation used synthetic containers without game files.
Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T11:52:41Z.
Independent CPU-only check of the offline translation change at
bda5b05c4afc981d01441fcd3a63da6d501dfcebagainstf85101b6095e8cf3cecf8f0647cc7f5428daa177. The GitHub test merge had the same source tree as the PR head.I generated 23 synthetic containers with two compute code bodies. The base skipped 21 duplicates and emitted 2 shaders. The PR skips 6 duplicates, emits 14 shaders, and surfaces all 3 intentional truncated-signature errors that the base skipped. This covers changes to each of ISG1, OSG1, PSG1 and PSV0, plus exact repeats, part reordering, changes to an unrelated PRIV part, and distinct code. The short code hashes stayed stable. For each revision, one serial run and eight 8-worker runs produced the same multiset of emitted bytes. Both compute controls emitted byte-identical DXIL across revisions.
The Linux harness includes the original translation and scanner modules with the Windows-only paths stubbed. It also passed the PR's new unit test. The untouched CLI passed Windows MSVC cross-target
cargo check --locked -p victory --all-targets --target x86_64-pc-windows-msvc --features blake3/pureon both revisions. The full Linux CLI build hit platform-gating errors on both. Windows linking, GPU execution, and Microsoft DXIL validation weren't exercised. All inputs were synthetic.Verification assisted by Codex.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.