Shaders: DXIL structure statistics for compile-cost reports #1954
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!1954
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1954"
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/dxil-stats→main· +1131 −1 · 4 files · 2 commits · draftStacked on #1953; only the top commit belongs here. Part of #1269.
Structure statistics of a DXIL module from one pass over its bitcode: functions, blocks, instructions, SSA values, phis and their incoming edges, branches, switches, backward branches, selects, loads, stores, calls by callee.
--explain(#1955) prints them for both translation paths.What is in it
Shaders: DXIL structure statistics for compile-cost reports–crates/xcl/src/gpu/dxil/stats.rs(container_stats,bitcode_stats,DxilStats::to_json) andstats_tests.rs. Value ids are tracked exactly (relative operands, explicit call types), so calls resolve to their callee.About 415 lines of code and 273 of tests: the statistics are one walk over the module, and the tests are mostly the DXC cross-check below, so I did not split it further.
Tested
cargo test --workspace --no-fail-fast -- --test-threads=4one7097e2: 981 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)validate::disassemble) of three compiled compute shaders (a loop, nested branches with a three-way phi, a switch with buffer loads and stores), and check two modules built with XCL's writer exactly; truncated and bit-flipped bitcode returns Ok or Err without panickingRegression run
main:
this PR (
e7097e2):Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 02:59 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.