CLI: key embedded shaders on their declared container bytes #979

Open
avt0m4t48 wants to merge 2 commits from upstream-pr/981 into main
avt0m4t48 commented 2026-11-25 14:52:51 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T14:52:51Z.


Fixes #736. Thanks to yualk for isolating the raw scanner and the cache-key mismatch.

When the scanner finds a raw DXBC container inside another file, use the exact validated span from its header. The translator and the offline cache now hash the same bytes as the runtime lookup, even when a second container or padding follows it.

  • The original Windows CLI reported one known hash asked and zero found. The patched CLI found both named test containers in a file with prefix and suffix bytes.
  • A separate native Windows smoke test built two synthetic console shaders. The CLI translated the requested shader. An exact-byte cache lookup then hit it, while the unrequested shader missed and could be cached and read back afterward.
  • The Windows DXBC parser tests and the asset policy on the exact production commit passed. The fixtures use authored data. They do not measure retail boot time or GPU pipeline creation.

Original CLI reproduction · Patched Windows verification

AI-assisted using Codex.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6607256897 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/981). Originally posted by [avt0m4t48](https://github.com/avt0m4t48) on 2026-11-25T14:52:51Z. --- Fixes #736. Thanks to yualk for isolating the raw scanner and the cache-key mismatch. When the scanner finds a raw DXBC container inside another file, use the exact validated span from its header. The translator and the offline cache now hash the same bytes as the runtime lookup, even when a second container or padding follows it. - The original Windows CLI reported one known hash asked and zero found. The patched CLI found both named test containers in a file with prefix and suffix bytes. - A separate native Windows smoke test built two synthetic console shaders. The CLI translated the requested shader. An exact-byte cache lookup then hit it, while the unrequested shader missed and could be cached and read back afterward. - The Windows DXBC parser tests and the asset policy on the exact production commit passed. The fixtures use authored data. They do not measure retail boot time or GPU pipeline creation. [Original CLI reproduction](https://github.com/avt0m4t48/victory-fork/actions/runs/45635131352) · [Patched Windows verification](https://github.com/avt0m4t48/victory-fork/actions/runs/45637575583) AI-assisted using Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/981:upstream-pr/981'
git switch 'upstream-pr/981'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/981'
git switch 'upstream-pr/981'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/981'
git switch 'upstream-pr/981'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/981'
git switch 'main'
git merge --squash 'upstream-pr/981'
git switch 'main'
git merge --ff-only 'upstream-pr/981'
git switch 'main'
git merge 'upstream-pr/981'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!979
No description provided.