Report per-shader failure reasons during translate --warm #436
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!436
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-436"
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?
@feanorsun on GitHub · 2026-11-27 01:25 UTC · original
feanorsun:fix/warm-report-failure-reasons→a-publier· +81 −17 · 1 files · 1 commits · openRefs #291
In the Wine reproduction, the command returned an error when it could not create the shader cache directory. With an existing read-only directory, it completed the scan and reported
1 do not translate. The write error itself was missing from the warm-up output.Keep the error string returned by each
warm_shadercall. The summary now saysfailedand prints each distinct reason once, with its count. Newly translated shaders and cache hits keep their separate counts. Individual failures still allow the command to finish the batch.Windows CPU verification
The filter listed and ran two tests. With the original counting and output logic, both output assertions failed. After the change, both passed, with 25 tests filtered out.
The mixed case supplies one new translation, one cache hit, two identical synthetic cache write errors and a distinct translation error. It checks the full summary and both reason lines. The success case checks that the summary has no extra lines. These tests exercise the reporting code used by
warm()with synthetic results. They require no shaders, GPU, or changes to filesystem permissions.@lvndrpup on GitHub · 2026-11-27 04:41 UTC · original · reviewed
Checked on Windows 11 build 26300, Rust 1.98.1, RTX 3060 Ti (driver 610.88), debug, with
victorybuilt at4eb6cfdand at08c405e. No game files here, so the containers fed to it are the 328 PC DXBC shaders in copies of Windows' ownd2d1.dllandd3d11.dll; they all fail to translate, which is the path this PR changes.4eb6cfdvictory translate --warm all --jobs 4 <folder>328 found: 0 translated now, 0 in the cache already, 328 do not translate, no reason328 found: 0 translated now, 0 in the cache already, 328 failedthen328 converter shader.dxil v1: malformed shader: no DXIL partcargo test -p victory --bin victory translate::testswarm_report_*among themcargo clippy -p victory --no-deps --all-targets -- -D warnings, with and without--all-featuresOne thing to look at: the reasons are grouped by the whole error string, and
ShaderError::UnsupportedandShaderError::IsaprintGFX10 code at {offset:#x}: .... Plaintranslatedrops the offset before grouping (translate.rsaround 599-656 at4eb6cfd,format!("emit: {what}")and the like), so its tally stays short. Here, a title with many shaders failing on the same unsupported instruction would get one line per shader, each with a count of 1. Not something I can show without the title's shaders; stripping theat 0x...part, or capping the list, would keep the summary readable.Not tested: a cache write error (the case from #291). These shaders fail before anything is written, and I have no shader that translates.
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.