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

Open
oxybes wants to merge 1 commit from upstream-pr/594 into main
oxybes commented 2026-12-04 12:01:40 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by oxybes on 2026-12-04T12:01:40Z.


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.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:5646048477 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/594). Originally posted by [oxybes](https://github.com/oxybes) on 2026-12-04T12:01:40Z. --- 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.
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/594:upstream-pr/594'
git switch 'upstream-pr/594'

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/594'
git switch 'upstream-pr/594'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/594'
git switch 'upstream-pr/594'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/594'
git switch 'main'
git merge --squash 'upstream-pr/594'
git switch 'main'
git merge --ff-only 'upstream-pr/594'
git switch 'main'
git merge 'upstream-pr/594'
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
readmet3xt-lab/foxhound!594
No description provided.