Recompiler: guard direct DXIL window stores with bit tests #2288
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!2288
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2288"
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?
@coolpersonnn on GitHub · 2026-11-25 12:27 UTC · original
coolpersonnn:codex/direct-dxil-store-guards-refresh→main· +73 −3 · 2 files · 1 commits · draftPart 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.
@GustavoEllwanger on GitHub · 2026-11-25 13:10 UTC · original
Independent dual-GPU Windows verification on exact PR head
5e502c50805e27fa1df1e833e413841f7f122503(parent426a5a7).Tested
1.95.0 (59807616e 2026-04-14), DXC1.8.2502.11, debug build.32.0.16.1088, Blackwell / wave32 + split-wave64):XCL_ADAPTER=5060 cargo test -p xcl --lib gpu::dxil::core_tests::raw_stores_in_root_windows_respect_exec_and_bounds -- --nocapture: 1 passed, 0 failed, 0 ignored (0 skipped).XCL_ADAPTER=5060 cargo test -p xcl --lib gpu::dxil:: -- --test-threads=4: 148 passed, 0 failed, 3 ignored (0 skipped).XCL_ADAPTER=5060 cargo test --workspace -- --test-threads=4: 1244 passed, 0 failed, 46 ignored (27 runtimeSKIPPED: 20 native-wave64 tests on wave32 NVIDIA, 3 per-lane#1426refusals, 2 missing D3D12 debug layer, 1 Developer Mode cache-disable, 1 heap windows).32.0.21042.62, native wave64):XCL_ADAPTER=Radeon cargo test -p xcl --lib gpu::dxil::core_tests::raw_stores_in_root_windows_respect_exec_and_bounds -- --nocapture: 1 passed, 0 failed, 0 ignored (0 skipped; verifies both wave32 and native wave64 paths).XCL_ADAPTER=Radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 1242 passed, 2 failed, 46 ignored (17 runtimeSKIPPED: 7 no mesh shaders, 6 per-lane#1426refusals, 2 missing D3D12 debug layer, 1 Developer Mode cache-disable, 1 heap windows). Both AMD failures are unrelated to this PR:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 540: res[833] = 0x7, CPU 0x6) — independently reproduced identically on cleanorigin/main(1a0bbe3) on this AMD driver.gpu::recomp::tests::gpu_image_get_resinfo_past_last_level— this PR's parent426a5a7predatesea088a5(Recompiler: image_get_resinfo past the last level gives 0 sizes on AMD too); independently confirmed passing (1/1) onorigin/main(1a0bbe3) on this AMD adapter.Not tested
scripts/smoke.ps1), Intel GPUs, non-Windows hosts.AI use
5e502c5, ran the focused and full workspace suites on both GPUs, verified the two AMD baseline failures againstorigin/main(1a0bbe3), and drafted this comment from the raw logs.@luckyteagirl on GitHub · 2026-11-25 13:30 UTC · original
Independent Windows/RX 6800M check of exact PR head
5e502c50805e27fa1df1e833e413841f7f122503against its base426a5a745db4d5e4b037449ede0b70cb342f5192.Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver
30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5.XCL_ADAPTER=6800M,XCL_DIRECT_DXIL=1, and isolated Cargo targets. Both production worktrees are clean. No game data was copied or attached.Focused test:
cargo test --locked -p xcl --lib -j 2 raw_stores_in_root_windows_respect_exec_and_bounds -- --test-threads=1 --show-output, withXCL_REQUIRE_GPU=wave64, exited0xC0000005twice on the PR head before the test harness recorded a pass/fail. In a temporary test-only diagnostic run, the process reachedwave32 before dispatchand crashed inside the firstrunner::run_in_arena; it never reached wave64. Windows Application Error events nameamdxc64.dllversion30.0.13002.13003, fault offset0x43801, in all three runs. The integrated Radeon on this laptop could not serve as a control: this fixture reportedno wave32there underXCL_REQUIRE_GPU=wave64.Base control: I copied only the PR's 48-line fixture to a detached
426a5a7tree and disabled its two PR-specific DXIL-shape assertions so it could reach the same dispatch with the base's original lowering. It also exited0xC0000005; Windows logged the sameamdxc64.dlland0x43801fault. This establishes that the crash is present with the base production code on this driver. I restored both test-only edits afterward. It does not establish correct GPU readback on either revision.Release and owned-title regression run:
cargo build --locked --workspace --release -j 2passed on the clean PR head. Both runs usedXCL_ADAPTER=6800M,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=0, default smoke script, the same owned title, separate fresh data/cache directories, and a 12-second duration. Neither hit my external process/memory guard.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.
@bielfreedom on GitHub · 2026-11-25 16:14 UTC · original
AMD Windows driver timing for #2288: on the RX 9070 XT, the direct-DXIL window-store guards are neutral in AMD's
CreateComputePipelineState(−0.7 %, within noise). That differs from #2191, the HLSL-path version of the same idea, which made the AMD driver 1.56× slower on this card (data).Setup
426a5a7;5e502c5.fnv64) and per-CreateComputePipelineStatetime.Method
XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=0(root windows, the form this PR changes),XCL_PIPELINE_THREADS=1.XCL_PSO_DISK_CACHE=0and a fresh exe name per run, because the AMD driver cache is keyed on the exe file name.84eee477d68b6fdf(CS_RaytracingResolve) and620491641aa9bad6.Results (means of 2 rounds; all 104 builds succeeded, 0 refused)
426a5a784eee477d68b6fdf: 63.0 → 60.1 s (−5 %);620491641aa9bad6: 19.9 → 18.6 s (−7 %);Tests on this card (
XCL_REQUIRE_GPU=1,XCL_ADAPTER=9070)raw_stores_in_root_windows_respect_exec_and_bounds: 1 passed, 0 failed, no SKIPPED notice. This is the native wave64 discrete-GPU run of it.Read / inference
Not tested
XCL_HEAP_WINDOWS=1.AI use: Claude Code (Claude Opus 5.5) ran the measurements and drafted this. Counts and timings only, no game data.
@DavidM1911 on GitHub · 2026-11-25 17:17 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.