CLI: compare runtime shader failures with offline coverage #1625
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1625
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1625"
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?
@srijann07 on GitHub · 2026-11-24 19:55 UTC · original
srijann07:tools/runtime-shader-coverage→main· +362 −0 · 3 files · 3 commits · openSummary
Related to #1579.
Adds a
shader-coverageCLI command to compare runtime shader translation failures against offline emission results.Changes
Usage
victory shader-coverage <runtime.log> [paths...]Verification
Windows CI results:
https://github.com/srijann07/VIctory/actions/runs/45473262548
Limitations
Unmatched hashes do not prove shader absence. Offline emission does not guarantee DXIL validation or successful GPU execution.
No actual title run was performed. Zero game assets included.
AI-assisted.
c7455da099to50b237a60b@srijann07 on GitHub · 2026-11-24 20:18 UTC · original
Thanks for the review, @catminou4!
I've added four dedicated unit tests for "plain", "reason", and "failures" in commit 1460a85, covering the parsing edge cases you suggested.
All four new tests passed, along with the full workspace test suite (350 passed, 0 failed) and both Clippy checks.
Windows CI: https://github.com/srijann07/VIctory/actions/runs/45478941041
I'd appreciate another look when you have time. Thanks!
@Marvisak on GitHub · 2026-11-25 01:32 UTC · original · edited 2026-11-26 07:21 UTC
Automated triage for the maintainers.
Merge candidate (as before the conflict). Thanks for the rebase onto
63bcca4. Themain.rschange now only registersShaderCoverageand dispatches it tocoverage::run.What I checked in
apps/victory/src/coverage.rs:failuresmatches the exact warningvictory_gpu::pipelinelogs inShader::translated, which isshader does not translate; its pipelines' draws are dropped, with fieldshash=anderror=followed bycached=/ms=. It strips thecached=suffix. The hash is the sameblake3(..)[..16]thatpipeline.rsuses. Only containers whose hash was asked for are translated, and nothing is written. It reusesshader::sources/MAX_FILE, adds no dependencies, and the README addition is one line. The tests cover the parsing edge cases and an actual translator failure.CI: passing.
Generated by Claude Code
@srijann07 on GitHub · 2026-11-25 06:09 UTC · original
Rebased onto upstream main (
940d32f), resolved the README conflict and preserved the additional parsing tests. Fresh Windows CI and both Clippy configurations passed.CI: https://github.com/srijann07/VIctory/actions/runs/45557227927
Ready for re-review. Thanks!
@srijann07 on GitHub · 2026-11-25 07:12 UTC · original
Thanks for identifying the parsing issue!
Fresh Windows CI, regression tests and both Clippy configurations passed.
https://github.com/srijann07/VIctory/actions/runs/45565441242
Ready for re-review. Thanks!
@srijann07 on GitHub · 2026-11-26 06:27 UTC · original
Rebased onto latest upstream main (
63bcca4) and resolved the conflict inmain.rs. All existing regression tests are preserved, and fresh Windows CI passed.CI: https://github.com/srijann07/VIctory/actions/runs/45767881219
Ready for re-review. Thanks!
@catminou4 on GitHub · 2026-11-24 20:06 UTC · original · reviewed
Static review only: victory-gpu/victory-hle/apps are Windows-only (D3D12/windows_sys), so nothing here compiles or runs on macOS — please rely on the Windows CI leg.
shader-coveragecompares runtime translation failures from a log against an offline scan: dedups 16-hex hashes, groups reasons by unsupported operation (stripping theGFX10 code at 0x…prefix), replays only matching byte extents throughemit, and reports emitted/failed/unmatched counts. Privacy-conscious likelist-diff(hashes and reasons only, no shader bytes; README documents keeping logs outside the repo). The CSI-stripping and hash validation are careful. Pure logic but the crate is Windows-only, so untested here — consider#[cfg(test)]unit tests forplain/reason/failuresparsing edge cases (they're platform-independent).@fuzeofficlal on GitHub · 2026-11-26 18:02 UTC · original · approved these changes
Looks good. Verified merged onto
main(63bcca43) on Windows 11:cargo xtask policy(192 files ok),cargo clippy --locked -p victory --all-targets -- -D warnings(default and--all-features), and all 27 tests invictory(including all 9 newcoverage::tests::*cases) pass.victory_core::logging::initusing the exacttracing::warn!call fromcrates/victory-gpu/src/pipeline.rs:139-148:victory shader-coveragestripped the CSI sequences, parsed the hash andGFX10 code at 0x...reason cleanly (1record,1unique hash,0malformed rows).(Non-blocking note: runtime
crates/victory-gpu/src/shader_cache.rs:87-88andapps/victory/src/translate.rs:571-572both translate withemit::Options { view_marks: true }, whereasapps/victory/src/coverage.rs:198callsemit::translate(b)(view_marks: false). View-mark lowering is currently infallible so pass/fail results match, though switching toemit::translate_with(b, emit::Options { view_marks: true })would keep offline comparison strictly matched to runtime settings going forward.)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.