Tests: pin direct DXIL bitstream, compact, and lowering invariants #2355
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!2355
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2355"
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?
@safesearch77 on GitHub · 2026-11-25 16:27 UTC · original
safesearch77:tests/dxil-bitstream-lowering-invariants→main· +278 −2 · 4 files · 1 commits · openAdd six pure-CPU unit tests across existing Direct DXIL
*_tests.rsmodules (bitreader_tests.rs,compact_tests.rs,robustness_tests.rs, reusinggraphics_tests::part) pinning bitstream serialisation, compact block-class planning and auto-nesting, split-Wave64 whole-live exchange elision, 64-bit integer compare lowering, and POPS ROV flag inference.No runtime files are modified (
*_tests.rsonly), and every test runs purely in memory without requiring a GPU ordxcompiler.dll.What is in it
crates/xcl/src/gpu/dxil/bitreader_tests.rs:phis_encode_signed_relative_ids_and_prune_unreachable_predecessors: verifiesFUNC_CODE_INST_PHIsigned-VBR forward (-1 -> 3) and backward (+1 -> 2) relative value IDs across loop back-edges, and verifies unreachable predecessor blocks and their incoming phi edges are omitted fromFUNC_CODE_DECLAREBLOCKSandFUNC_CODE_INST_PHI.alloca_explicit_type_bit_and_unused_symbol_elision: verifiesFUNC_CODE_INST_ALLOCAsets the LLVM 3.7 explicit-type bit (1 << 6) alongsidelog2(align) + 1with distinct pointee types (i32vsi64), and verifies unreferenced globals and unreferenced externaldx.opdeclarations are elided fromMODULE_CODE_GLOBALVAR,MODULE_CODE_FUNCTION, andBLOCK_VALUE_SYMTAB.crates/xcl/src/gpu/dxil/compact_tests.rs:plan_splits_getpc_static_samplers_and_loop_headers: verifiescompact::plansplits byte-identical blocks whens_getpc_b64sits at distinct PCs, whenstatic_samplersbinds distinct constantS#words (while merging matchingS#words), or when only one copy is a natural loop header spendingVAR_BUDGET, plus checks packedPlan::words().auto_nest_threshold_switches_at_512_classes_in_emitted_ir: verifiescompact::emit_with_nest(..., Nest::Auto)emits a single flat switch at511classes (AUTO_NEST_MIN_CLASSES - 1) and transitions at512classes (AUTO_NEST_MIN_CLASSES) to two-level dispatch (1outer switch +16inner switches of32targets).crates/xcl/src/gpu/dxil/robustness_tests.rs&crates/xcl/src/gpu/dxil/graphics_tests.rs:graphics::tests::parttopub(in crate::gpu::dxil)sorobustness_testsreuses it without duplicating container parsing.split_wave64_whole_live_elides_exchange_barriers_for_lane_local_masks: verifies split-Wave64 compute lowering keeps only thexcl_wtwave counter (1addrspace-3 global,4TGSM bytes,1barrier) whenVCCis read per-lane (v_cndmask_b32), while allocatingxcl_x64_s(2addrspace-3 globals,12TGSM bytes,3barriers) whenVCCis read as a scalar SGPR (s_mov_b32), and verifies 64-bit integer compares (v_cmp_lt_i64) do not setD3D_SHADER_REQUIRES_INT64_OPS(0x8000) inSFI0.pops_pixel_shader_gates_rov_sfi0_flag_on_surviving_uav_handles: verifies pixel-shaderD3D_SHADER_REQUIRES_ROVS(0x1000inSFI0) underHEAP_WINDOWSis set iff POPS (src_pops_exiting_wave_id) is used and anIsROVheap UAVannotateHandlesurvives dead-code elimination.Tested
rustc --edition 2021 --testharness overgpu::dxilon commitb2da28c, base0829441):34 passed; 0 failed(bitreader_tests:6 passed,compact_tests:10 passed,robustness_tests:10 passed,graphics::tests:8 passed).cargo check --offline --target x86_64-pc-windows-gnu --workspace --tests(0errors,0new warnings).python3 scripts/pr_check.py --local(description ok,*_tests.rs-only diff).Not tested
cargo test --workspace -- --test-threads=4GPU suite (authored and executed on a Linux CPU host without a D3D12 GPU ordxcompiler.dll; all 6 added tests are pure-CPU unit tests that run on the standard no-GPU Windows CI runner).*_tests.rschange; no runtime code modified).AI use
cargo check --workspace --testsandscripts/pr_check.py --local.@DavidM1911 on GitHub · 2026-11-25 18:37 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!
@SlopTart on GitHub · 2026-11-25 19:05 UTC · original
Tested: current PR head merged onto current
origin/main(clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite, cold cache: 143 passed / 4 failed. The fourth failure besides the baseline trio isgpu_geometry_wave32_prefix_count_over_a_mask, which passes 3/3 solo at--test-threads=1on this tree and passes in-suite on other trees; order-dependent flake family, not attributable to this PR. The tests this PR pins all ran inside the suite and passed.Not tested: retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
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.