Shaders: xcl shaders --explain reports a program's guest code and direct DXIL #1955
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!1955
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@sombraSoft on GitHub · 2026-11-24 23:51 UTC · original
sombraSoft:shaders/explain→main· +1716 −3 · 10 files · 3 commits · draftStacked 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
@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.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.