CLI: include runtime shader hashes in the translation listing #378
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/378"
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 Marvisak/VIctory. Originally posted by Mesrine67 on 2026-11-24T02:45:29Z.
Summary
translate --listnow prints the 16-character BLAKE3 hash VIctory uses for runtime pipeline diagnostics. List mode also processes containers with duplicate DXIL, since distinct containers can have different runtime hashes even when they translate to identical DXIL. The regular aggregate scan remains deduplicated and does not compute this extra hash.Related to #293.
Evidence
--listfailure rows had archive locations and offsets but no runtime hash, so the highest-loss hashes in #293 could not be joined to translation failures.910b4be059bfb28f->MSNC_VS_LinearDepthSkin_1b4b70ba_Wrapped: descriptor neither loaded nor built.321d411b20a35ef9->MSNC_VS_LinearDepthSkin_f1f2249c_Wrapped: descriptor neither loaded nor built.adc5c689b0552cc2->MS_VS_PropFoliageDeferred_7cf79608_Wrapped: descriptor neither loaded nor built.e30970f1727063fd->CS_ComputeImposterTransform_15082ab2_Wrapped: structured buffer of unknown stride.caf96a3229145fa6->CS_CollisionRaytraced_2776e795_Wrapped: address not from a root parameter.d2a4bae, without the PR stack listed in #293. Its translation failure counts are not in-game draw-loss measurements.cargo test -p victory --locked— 1 passed.cargo build -p victory --locked— passed.rustfmt --check --edition 2024 apps/victory/src/main.rs apps/victory/src/translate.rs— passed.Merge Danger
Door: Two-way
Blast Radius: CLI
Hashing and processing duplicate DXIL containers happens only in
--list; the regular aggregate scan keeps its existing deduplication path.Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-24T04:14:23Z.
Thanks @TurGangS for this listing improvement. I tested head
2392dfd79a190bd3a8a0ab568b28d306cda37980with:Result: 1 passed, 0 failed. The command compiled the modified CLI package and ran its existing
run::tests::loader_lock_is_reentrant_and_exclusivetest. There is no test in this package for the new--listruntime-hash or duplicate-container rows, so those output changes remain unexercised by this run; I did not launch the application.Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T07:52:35Z.
Review: APPROVED
Tested
2392dfdon Windows 11, RTX 5070, MSVC:cargo test --workspace --no-fail-fastpasses (264 passed, 0 failed).victory-gpu'spipeline::shadernames a container byblake3::hash(bytes).to_hex()[..16]over the whole container, and--listnow hashes the samebytesthe same way, so the rows join with #293's per-hash drop reports.--list, so the normal aggregate scan's counts and speed are unchanged. The hash is computed only in list mode.No issues found.
AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-24T18:59:49Z.
Checked the printed hashes against the runtime side: they match, and there is one scope gap worth knowing.
I built head
2392dfdand its real based2a4bae(131 commits behindmainatffe310e, which is why the two report different translator outcomes) and ran the same command over a local copy of the v1.0.2.1 shader archive — Windows 11 26100, RTX 4090, driver 621.24, validatordxil.dllfrom SDK 10.0.26100.0,--jobs 10:What the change actually does, measured against its own base:
d2a4bae(base)2392dfd(this PR)26503 (614 duplicates skipped)26503 (0 duplicates skipped)hash=hash=values in those rows26084 of 2608426698 of 26698The hash is the same value the runtime logs. I had derived that mapping independently of this PR:
crates/victory-gpu/src/pipeline.rsinterns containers byblake3::hash(bytes)and logsfull.to_hex()[..16], so a ~60-line program of mine built onvictory_game::sgd5that hashes each record's unpacked bytes — plus everyDXBCcontainer stored uncompressed, whose length is the field at offset0x18— gives 26,503 records and 25,889 distinct byte strings for this file. That 614 is exactly the number the header reports, so the dedup and my count are the same measurement from two sides. Fed into the title's ownfirst bindlines from two 900-second runs I made onffe310ewith the same GPU and driver: all 25 distinct containers those runs bound correspond to a container in the package byte for byte, and thesize=in those lines equals the container length in all 25 cases. With this PR's listing, 23 of those 25 appear with identical hex digits and are markedvalidated—VS_Blit_6e5520d1_Wrapped @0x10295f96 hash=58d926085fca4999,VText_a4ab6e63_Wrapped @0x102f2098 hash=d5b1bcfe40fd84b2,postfx_lut:CS_LUT3DBakeColorGradingAdjustments_39a5dbbe hash=052a2316a03b9ba1, and 20 more. So the value this prints is usable to join a runtime log to the census, which is what #293 wants.One gap in scope. The 2 that do not appear are not in the archive: they are stored uncompressed inside the title's own executable (
@0x688cd3c, 992 B vertex and@0x688e86f, 964 B pixel →dfafaf385b2f94e8and06295fb1d1aefb78), and they are the first twofirst bindlines of both of my runs (frame 2,user_data=0 samplers=0) — the first pipelines any boot binds at all.apps/victory/src/shader.rs::sources()does find them when the executable is in scope, through its rawDXBCscan; a listing pointed only at the shader archives cannot see them. For "which shaders does the title actually use", that is a real blind spot rather than a defect of this PR.Two things I would want before the listing is used as the base of the #293 ranking.
--validateis part of the recipe, not an option:--listwithout it prints failure rows only, on the head (3,782 rows, nonevalidated) and onmainffe310e(4,041 rows, nonevalidated). The programs that work — which is most of what the ranking needs — get ahash=only in a validated run.--listand the aggregate mode now disagree for the same input and the same commit: 3,933 refused programs with--listagainst 3,918 without, and the header claims0 duplicates skippedwhile the aggregate header claims614. Anyone comparing a listing against the published table hits a 15-program difference that has nothing to do with the translator. Keeping the count in the header (614 duplicate containers included) or adding a line stating that list mode expands them would keep the two modes comparable. Related: joining byhash=will match several rows, because the archive genuinely contains repeats (504 of those 25,889 hashes appear in 2 or 3 records —MS_VS_TransformD_c5fd36bb_Wrappedin three), and the runtime shares one translation between them.As @jeremygold02 noted, no test exercises either new output. A case with two identical containers asserting the same
hash=on both rows, and one asserting a known container's row carries the expected digest, would cover both changes at once.Written with an AI assistant.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:28:16Z.
Automated triage for the maintainers.
Needs work. Joining
--listrows to the runtime hash is useful. Two things:translate()the hash isblake3::hash(&bytes), but forSource::Rawthat slice is&data[offset..]to the end of the file (Source::bytesinapps/victory/src/shader.rs), while the runtime (Shader::newinvictory-gpu/src/pipeline.rs) hashes only the container. Trim to the size field at 0x18 first, as the survey inshader.rsand the warm-up loop intranslate.rsalready do.--listchanges the totals. Duplicates are no longer counted or skipped, so the header shows "0 duplicates skipped" and program/refusal counts are inflated. Keep the counts the same and still print the extra rows.A test with two identical containers checking the same
hash=would help. Please also rebase:translate()on main now accepts an ACCC part.CI: no check runs on the head commit.
Generated by Claude Code
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.