Hash only the declared bytes of embedded DXBC containers #322

Closed
github-bot wants to merge 1 commit from github-bot/gh-322 into main AGit
Owner

@⁠agonisingbasher on GitHub · 2026-11-26 16:41 UTC · original
fix/embedded-dxbc-cache-key → main · +38 −4 · 2 files · 1 commits · closed without merging

When the shader scanner finds an uncompressed DXBC container, it currently passes the entire suffix of the enclosing file downstream. Different copies of the same shader then produce different hashes, and the shader cache can hash and copy unrelated archive data.

This change keeps the slice already bounded by the DXBC parser and passes it to shader-info, translate, and shaders through their shared scanner. Packed SGD5 records continue through the existing path.

Validation

  • The Windows diagnostics build and the embedded-container regression test passed. The asset policy check also passed.

  • A synthetic 16 MiB file containing 512 identical valid DXBC headers produced 512 distinct hashes before the fix and one after it. Median shader-info --verbose time across three runs on this machine went from 3.973 s to 0.073 s. This measures the offline scanner.

  • The full diagnostics suite for the Victory CLI passed (27 tests). On an RX 6600 XT, a separate local shader inventory matched the README totals: 25,694 translated entries and 195 unsupported entries in the shader archive, plus 96 translated entries and no errors from the executable and DLL scan. The executable and DLL scan used the patched build. The patch addresses cache keys and scanner cost.

**@⁠agonisingbasher** on GitHub · 2026-11-26 16:41 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/322) `fix/embedded-dxbc-cache-key` → `main` · +38 −4 · 2 files · 1 commits · closed without merging When the shader scanner finds an uncompressed DXBC container, it currently passes the entire suffix of the enclosing file downstream. Different copies of the same shader then produce different hashes, and the shader cache can hash and copy unrelated archive data. This change keeps the slice already bounded by the DXBC parser and passes it to `shader-info`, `translate`, and `shaders` through their shared scanner. Packed SGD5 records continue through the existing path. ### Validation - The Windows diagnostics build and the embedded-container regression test passed. The asset policy check also passed. - A synthetic 16 MiB file containing 512 identical valid DXBC headers produced 512 distinct hashes before the fix and one after it. Median `shader-info --verbose` time across three runs on this machine went from 3.973 s to 0.073 s. This measures the offline scanner. - The full diagnostics suite for the Victory CLI passed (27 tests). On an RX 6600 XT, a separate local shader inventory matched the README totals: 25,694 translated entries and 195 unsupported entries in the shader archive, plus 96 translated entries and no errors from the executable and DLL scan. The executable and DLL scan used the patched build. The patch addresses cache keys and scanner cost.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 16:43:37 +00:00
github-bot closed this pull request 2026-11-27 04:11:25 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.