Shaders: --explain --json writes a line per program; --explain-diff #1948
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by sombraSoft on 2026-11-24T23:51:27Z.
Stacked 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
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:59:34Z.
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.upstream-sync referenced this pull request2026-11-25 04:08:41 +00:00
upstream-sync referenced this pull request2026-11-25 10:09:30 +00:00
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:04:57Z.
Review: COMMENTED
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.
Pull request closed