Shaders: xcl shaders --explain reports a program's guest code and direct DXIL #1945
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1955"
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:17Z.
Stacked on #1954; only the top commit belongs here. Part of #1269.
Numbers in #1269 come from different commits, program sets and cache states, so they rarely compare, and finding what makes one shader expensive is done by hand.
xcl shaders <pack> --explainreports, per console program picked by--hashor a seeded--sample: the guest program (instruction classes, blocks, loops, back edges, indirect jumps) and the direct translator's time, memory and DXIL structure (#1954), or why it refused. Counts are portable (equal for the same commit and options; a fingerprint and a digest line say so), times and memory local. Programs are named by hash only, so a report can be posted. XCL caps its own commit during the run (--mem-gb, default 8) with a job object, since the direct translator runs in-process. The HLSL path (#1957) and JSON / comparing reports (#1958) follow.What is in it
Shaders: xcl shaders --explain reports a program's guest code and direct DXIL–crates/xcl/src/shaders/explain.rs,explain/direct.rs,explain/limits.rs; the hook inshaders.rs; help inmain.rs;README.mdAbout 480 lines of code and 100 of tests; the core without a translation path would report the guest program only, so the direct path is in the same PR.
Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on21aee9d: 983 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)shaders.rpf), onfb2eeec(the top of this stack): the largest compute program goes through the direct translator in 0.97 s and 172 MB, 3.8 MB of DXIL bitcode with 36 818 blocksRegression run
main:
this PR (
21aee9d):Not tested
--measure-psoneeds Windows Developer Mode, off on this machineAI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:59:31Z.
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.Pull request closed