Repository navigation
Recompiler: guard direct DXIL window stores with bit tests - #2288
coolpersonnn wants to merge 1 commit into
Conversation
Use one-hot window guards for dynamic raw stores through root UAVs. Clear the mask for inactive lanes and out-of-range windows before testing any bit. Against main 426a5a7, three paired RTX 5090 trials per record reduced median first-use driver build time by 5 to 34 percent on four of five retail compute records. The fifth was within 0.5 percent. The GPU readback passed in wave32 and split-wave64 on the RTX 5090, and the store regression passed on Radeon. The four NVIDIA fuzz failures reproduced on the clean base. Part of xcl-dev#2088 Reapplies the lowering and test from local commit 29b9dcb. Assisted-by: OpenAI Codex (GPT-6, exact variant unavailable)
|
Independent dual-GPU Windows verification on exact PR head Tested
Not tested
AI use
|
|
Independent Windows/RX 6800M check of exact PR head Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver Focused test: Base control: I copied only the PR's 48-line fixture to a detached Release and owned-title regression run: Base: PR head: Limits: The focused GPU fixture is blocked by this driver's pre-existing compiler crash, so I cannot confirm its value readback on this card. The brief title run does not show whether it exercised the changed root-window store path; frame counts are not a performance comparison. I did not run the full workspace suite on this head. AI use: OpenAI Codex (GPT-6; exact variant not exposed in this session) ran the native Windows tests, inspected the Windows fault events, constructed and restored the test-only base control, monitored the paired title runs, and drafted this report. No game files were uploaded. |
|
AMD Windows driver timing for #2288: on the RX 9070 XT, the direct-DXIL window-store guards are neutral in AMD's Setup
Method
Results (means of 2 rounds; all 104 builds succeeded, 0 refused)
Tests on this card (
Read / inference
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the measurements and drafted this. Counts and timings only, no game data. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
In direct DXIL root-UAV window mode (`XCL_DIRECT_DXIL=1`, `XCL_HEAP_WINDOWS=0`), every scalar/buffer/flat read previously went through `with_mem_many_tys`, emitting a per-load `switch i32` + guard CFG and `phi` nodes over all 4 root-UAV windows (`u2..u5`). Compute shaders with hundreds of loads grew thousands of basic blocks, triggering multi-second to multi-minute cold NVIDIA driver compiles and high compiler commit memory. Replace multi-window direct DXIL read-only raw loads on non-graphics stages (`self.gfx.is_none()`, `self.heap_mem.is_none()`) with branchless straight-line loads via `with_mem_raw_loads`: - Resolve the effective window `w_eff = sel(guard, w, n)` once and compare `w_eff == k` across windows `0..n`, reading offset `0` on unselected windows/lanes and merging with `select`. - Preserve `xcl-dev#1693` semantics: out-of-range window indices and inactive lanes select `0` while emitting only valid offset-0 reads on bound windows. - Ensure `bind.rs` (`u2..u5`, filtering `v != 0`) and `runner::dispatch_with` always bind valid non-null buffers for all 4 root-UAV window slots. - Exclude graphics stages (`VS`/`PS`, `self.gfx.is_some()`), where flattening root-UAV loads regressed straight-line PS cold NVIDIA compile time by 5.64x (1,632 -> 9,203 ms on `0829441`). - Keep stores/atomics (`xcl-dev#2288`), `bvh_intersect`, `XCL_HEAP_WINDOWS` (`xcl-dev#1695`), and HLSL emission (`xcl-dev#1380`/`xcl-dev#2191`) unchanged. Measured on RTX 5090 (driver 621.01, Windows 11, release) against `3f4495a` (including PR xcl-dev#2346 non-coherent compute windows, 3 paired interleaved trials per spec with cold root-signature keys and fresh exe copies): - `cs-500-raw-w32` (non-coherent / coherent): 5,133 -> 1,748 ms (2.94x) / 5,129 -> 1,751 ms (2.93x); peak commit 309 -> 191 MiB - `cs-1000-raw-w32` (non-coherent / coherent): 19,742 -> 5,156 ms (3.83x) / 19,767 -> 5,132 ms (3.85x); peak commit 993 -> 259 MiB (-73.9%) - `cs-1000-raw-w64` (split wave64): 19,709 -> 5,171 ms (3.81x); peak 994 -> 259 MiB - `cs-1000-w32` (mixed w/ 33% FormatLoad, non-coherent / coherent): 49,431 -> 17,977 ms (2.75x) / 49,944 -> 18,058 ms (2.77x); peak 1.34 GiB -> 464 MiB - Synthetic GPU dispatch (128 loads/lane, uniform & mixed, w32 & split w64): 1.84x to 4.68x faster (3.296-6.688 us vs 9.696-22.608 us), 100% readback match. Assisted-by: T3 Code (gemini-pro-orchestrator-neon) Assisted-by: Codex in T3 Code (gpt-6.2-sol)
Part of #2088. Replace the dynamic direct DXIL raw-store switch with a one-hot guard per root UAV window. The mask clears for inactive lanes and out-of-range window indices.
What is in it
lower_mem.rsemits the window guards.core_tests.rschecks the DXIL and GPU readback in wave32 and wave64 across four windows, including inactive lanes and invalid indices.Tested
426a5a7→5e502c5. Median first-use NVIDIA pipeline build time fell 5.0–33.6% on four of five records. The fifth rose 0.47%. The driver caches stayed enabled. Same-layout warm replays took 0.892–3.341 ms. GPU readback passed and synthetic dispatch time fell in both wave modes. Measurements and cache controlscargo build --workspace --locked --offline -j 8passed.cargo test --workspace --locked --offline -j 8 --no-fail-fast -- --test-threads=4 --nocaptureon the RTX 5090 withXCL_SAMPLE_RPFand an isolatedXCL_DXIL_CACHEgave 1,240 passed, 4 failed, 46 ignored and 25 GPU skip notices. The same four fuzz seeds (70, 545, 1019, 1507) failed with0x8007000Eon the clean base.cargo test -p xcl --lib --locked --offline -j 8 raw_stores_in_root_windows_respect_exec_and_bounds -- --nocaptureon the RTX 5090 and Radeon iGPU gave 1 passed, 0 failed, 0 ignored and 0 GPU skips on each.cargo test -p xcl --lib --locked --offline -j 8 -- --test-threads=4 --nocaptureon WARP gave 1,175 passed, 0 failed, 26 ignored and 311 GPU skip notices.Regression run
After the push, both release builds ran
./scripts/smoke.ps1 -Game $RetailTitleFolder -Seconds 60 -Xcl $ReleaseExe -OutDir $SmokeArtifactswithXCL_ADAPTER=5090,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=0,XCL_PSO_TRACE=1andXCL_FRAME_DUMP=300. Each started with empty XCL caches. NVIDIA implicit caches stayed enabled.Clean main
Clean head
Not tested
AI use
OpenAI Codex (GPT-6, exact variant unavailable) wrote the lowering and regression test, ran the benchmark, tests and smoke pair, and drafted this description.