Shaders: --explain --json writes a line per program; --explain-diff #1958
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1958
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1958"
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?
@sombraSoft on GitHub · 2026-11-24 23:51 UTC · original
sombraSoft:shaders/explain-json→main· +2383 −21 · 13 files · 7 commits · draftStacked on #1957; only the top commit belongs here. Part of #1269.
--explain --jsonwrites JSON Lines (a header with the fingerprint, a line per program as it finishes, a footer with the digest), so a stopped run keeps what it finished.xcl shaders A.json --explain-diff B.jsonlists the portable numbers that changed per program and totals over the programs in both; local numbers (times, memory) only when both reports come from the same machine.What is in it
Shaders: --explain --json writes a line per program; --explain-diff–crates/xcl/src/shaders/explain/diff.rs, JSON output inexplain.rs, the hook inshaders.rs; help and READMETested
cargo test --workspace --no-fail-fast -- --test-threads=4onfb2eeec: 989 passed, 0 failed, 45 ignoredSKIPPED(all from existing tests): 18 × no wave64, 1 × no heap windows, 1 × cannot disable the driver cache (Developer Mode off), 3 × per-lane form refused (f16 / VOP3 modifiers)fb2eeecagainstfb2eeec+ #1529 (same machine): DXC −15.1 % in total (two runs offb2eeecdiffer by 1.9 %), and 4.5 % more DXIL blocks on the HLSL path (36 391 → 38 013), bitcode +0.2 %Regression run
main:
this PR (
fb2eeec):Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 02:59 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main(README.md+crates/xcl/src/shaders.rs) — needs a rebase before it can be tested.@luckyteagirl on GitHub · 2026-11-26 09:04 UTC · original · reviewed
On
fb2eeec,--explain-diffparses every JSONL line before it checks for a missing footer. If a report is interrupted midway through its final write, it can contain a valid header and completedprogramrecords followed by an unterminated fragment such as{"kind":"program".text.lines()passes that fragment toserde_json::from_str, soloadreturns an EOF parse error and the command exits 2 instead of comparing the completed records. The current interrupted-run test only removes the footer from otherwise complete lines.Could the loader tolerate an incomplete, unterminated last line while continuing to reject malformed complete or interior lines? A JSONL fixture with one completed program and a truncated final program would exercise the interrupted-run promise. This is source review only; I did not run the CLI fixture.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.