Keep shader metadata variants in the offline translation census #1183
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!1183
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1183/head"
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?
@Jitheswar on GitHub · 2026-11-24 16:22 UTC · original
shader-census-container-identity→main· +67 −8 · 2 files · 1 commits · closed without mergingThe offline translation census (
victory translate) skipped a container as a duplicate when its DXIL part hashed the same as one already seen. The DXIL part alone leaves out the input, output and primitive signatures (ISG1,OSG1,PSG1) and the runtime info (PSV0), and emission reads all four. So two containers with the same native program but different signatures or mesh runtime info were counted once, and the second variant was never translated or reported.What changes
emit::emission_metadatanames the four parts emission reads.emit_withnow takes them from it, so the census and the emitter agree on what matters.Test:
translate::tests::deduplication_includes_signature_and_runtime_partsbuilds synthetic containers. Reordering parts or adding an unrelatedHASHpart keeps the key. Changing a signature's bytes, moving bytes between signatures, adding an emptyPSG1, or adding aPSV0changes it.Rebased onto
940d32f(upstream splitemitintoemit/emit_with; the metadata change now lives inemit_with).cargo test -p victory-shaderpasses (144). Thevictoryapp tests pass for the Windows target under Proton (11, including this test and upstream'semit_dump_inside_repo_is_refused). Windows-target clippy-D warningsis clean. No game data in the test.AI-assisted (Claude Code, Codex).
🤖 Generated with Claude Code
@Zipettte on GitHub · 2026-11-24 18:00 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d035f4d:
cargo test -p victory -p victory-shaderpasses, 122 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Aniseto on GitHub · 2026-11-24 18:16 UTC · original
Ran the new census test at
d035f4d:Environment: Windows 11 Pro build 26200 x64, Intel Core i5-12400F, 64 GB RAM, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only) driver 32.0.16.2124, Rust 1.98.1 (pinned by
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.translate::tests::deduplication_includes_signature_and_runtime_partspasses. Small note for other testers: it lives in thevictoryapp crate, not invictory-shader, socargo test -p victory-shader deduplicationfinds nothing.The test covers the key composition itself (signature and runtime parts change the hash), not a full census over a retail pack.
Not tested: a real offline translation census on a retail shader pack (no game data here), RDNA2/RDNA4 and Intel GPUs.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the test, wrote this report; no game data was used.
@Jitheswar on GitHub · 2026-11-24 21:00 UTC · original
I verified
d035f4donmainatffe310e. The synthetic signature/runtime metadata regression passed on Linux with #1017 applied locally and in the combined Windows-target shader branch build under Proton.Offline A/B on the retail GTA VI Xbox Series 1.0.2.1 shader archive produced the same 26,503 containers, 614 skipped duplicates, and 26,084 programs for both builds. Emission totals also matched. On this archive the finer key did not change the census counts. DXIL validation and host pipeline creation were outside this Linux comparison.
AI-assisted with Codex. No game data is included.
@Jitheswar on GitHub · 2026-11-24 21:57 UTC · original
Rebased onto
70564ae. The synthetic metadata-deduplication regression passed in the Windows-target workspace suite under Proton, and the same 66 tests failed as on the untouched base. Asset policy passed. This rebase check used synthetic tests. AI-assisted with Codex.@Marvisak on GitHub · 2026-11-25 00:38 UTC · original · edited 2026-11-25 02:24 UTC
Automated triage for the maintainers.
Recommended for a maintainer's look. The offline census in
apps/victory/src/translate.rsdeduplicated containers by the DXIL part alone.emit_withalso readsISG1,OSG1,PSG1andPSV0, so two containers that differ only in those parts were counted once.translation_keynow hashes all five parts, each framed by its length with a marker for a missing part.emit::emission_metadatais the single list both sides use. The emitter refactor inemit/mod.rsdoes not change behaviour. The test checks that part order and unrelated parts don't matter, while changed, moved, empty or added metadata parts do. A tester measured no change in counts on the title's archive, so this is a correctness fix for the tool rather than a visible gain. It also touchestranslate.rs, like #1017 and #1185. CI is passing.Generated by Claude Code
Pull request closed