Shaders: DXIL structure statistics for compile-cost reports #1944
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by sombraSoft on 2026-11-24T23:51:14Z.
Stacked 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
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:59:24Z.
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!
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
Pull request closed