gpu: name the shader digest when it does not translate #594

Open
github-bot wants to merge 1 commit from github-bot/gh-594 into main AGit
Owner

@⁠oxybes on GitHub · 2026-12-04 12:01 UTC · original
oxybes:pr/warn-digest → main · +32 −0 · 1 files · 1 commits · draft

When a shader does not translate, the warning names it by hash, which is a 16-character content hash of the container. Title-profile roles (wave_wide_refused, wave_wide, scene_kernel_64, and so on) are matched by the full 16-byte digest in the DXBC header (0x04, see crates/victory-shader/src/dxbc.rs). A reader with only hash cannot turn the log line into the profile entry the warning is asking for.

This adds the digest to the same warning:

WARN victory_gpu::pipeline: shader does not translate; its pipelines' draws are dropped stage="compute" hash=... digest=<32 hex> error=...

The field comes from a small digest_hex helper (container[4..20], 32 lowercase hex characters, empty when the container is shorter than the header). It runs only in the arm that already fails; there is no change to translation, the cache key or any behaviour. The message text and the existing keys stay the same, so log parsers that match the text or hash=/error= keep working.

Testing

cargo test -p victory-gpu --lib: 643 passed. The new the_warning_names_the_full_digest covers a 20-byte container, a 19-byte one and an empty one.

Why it is useful

Writing a title profile means naming the programs the engine refuses by digest; today the engine prints only the short hash (a different value), so a title author has to instrument the translator to find it. One field in the warning removes that step. It does not fix any translation by itself.

**@⁠oxybes** on GitHub · 2026-12-04 12:01 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/594) `oxybes:pr/warn-digest` → `main` · +32 −0 · 1 files · 1 commits · draft When a shader does not translate, the warning names it by `hash`, which is a 16-character content hash of the container. Title-profile roles (`wave_wide_refused`, `wave_wide`, `scene_kernel_64`, and so on) are matched by the full 16-byte digest in the DXBC header (`0x04`, see `crates/victory-shader/src/dxbc.rs`). A reader with only `hash` cannot turn the log line into the profile entry the warning is asking for. This adds the digest to the same warning: ``` WARN victory_gpu::pipeline: shader does not translate; its pipelines' draws are dropped stage="compute" hash=... digest=<32 hex> error=... ``` The field comes from a small `digest_hex` helper (`container[4..20]`, 32 lowercase hex characters, empty when the container is shorter than the header). It runs only in the arm that already fails; there is no change to translation, the cache key or any behaviour. The message text and the existing keys stay the same, so log parsers that match the text or `hash=`/`error=` keep working. ## Testing `cargo test -p victory-gpu --lib`: 643 passed. The new `the_warning_names_the_full_digest` covers a 20-byte container, a 19-byte one and an empty one. ## Why it is useful Writing a title profile means naming the programs the engine refuses by digest; today the engine prints only the short hash (a different value), so a title author has to instrument the translator to find it. One field in the warning removes that step. It does not fix any translation by itself.
Title-profile roles are matched by the full 16-byte container digest, while the warning printed only the 16-character short hash, so a log line could not be turned into a profile entry. Add the digest beside the hash. The field is computed only in the already-failing arm and changes no translation.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 12:06:22 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/594/head:github-bot/gh-594'
git switch 'github-bot/gh-594'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-594'
git switch 'github-bot/gh-594'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-594'
git switch 'github-bot/gh-594'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-594'
git switch 'main'
git merge --squash 'github-bot/gh-594'
git switch 'main'
git merge --ff-only 'github-bot/gh-594'
git switch 'main'
git merge 'github-bot/gh-594'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.