Repository navigation
Recompiler: prioritize wanted DXC compiles and reserve worker headroom - #2423
ChalanaGimhanaX wants to merge 1 commit into
Conversation
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
4ac4637 to
63ea17f
Compare
…#2404, xcl-dev#2405 Integrates VRAM top-mip pressure shedding (xcl-dev#2385), DXC wanted-compile prioritization & worker headroom (xcl-dev#2423), inline split pipeline foreground path (xcl-dev#2424), ExecuteIndirect split program dispatch (xcl-dev#2404), and hosted view heap exhaustion null-pair fallback (xcl-dev#2405). Assisted-by: Antigravity (Gemini 4 Neon)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin |
|
Thanks for running verification! That failure is from a stale base before This PR only touches |
bmjask
left a comment
There was a problem hiding this comment.
No concrete correctness or liveness defect found. The queue/promotion ordering, notification discipline, worker reserve, and panic recovery look sound, and current Windows checks are green. Nonblocking validation gap: tests use synthetic Queue workers rather than the actual pool()/state::boot()/Pending::want glue. A focused integration test that promotes an already-queued real DXC job after a title bind would increase confidence; cold-cache multi-minute title validation also remains untested.
…#2404, xcl-dev#2405 Integrates VRAM top-mip pressure shedding (xcl-dev#2385), DXC wanted-compile prioritization & worker headroom (xcl-dev#2423), inline split pipeline foreground path (xcl-dev#2424), ExecuteIndirect split program dispatch (xcl-dev#2404), and hosted view heap exhaustion null-pair fallback (xcl-dev#2405). Assisted-by: Antigravity (Gemini 4 Neon)
|
Independent Windows/RTX 3080 Ti check of #2423 head Tested — Windows 11 Pro build 26300, RTX 3080 Ti 12 GB / driver 621.35, Ryzen 7 9800X3D, 32 GB RAM, Rust 1.99.1 MSVC, DXC 1.8.2502.11.
Not tested — a cold multi-minute retail world-load pair, the actual AI-assisted: Codex (GPT-6, exact variant unavailable) reviewed the paths, ran these tests, and drafted this report. |
|
Independent AMD report for Tested
Not tested
AI use Claude Code (Claude Sonnet 5.5) ran the tests and wrote this report. No game files, dumps or shader names are included. |
Part of #1164
Part of #1452
Part of #1833
What is in it
Replaces the single FIFO
mpsc::channelindxc::pool()(crates/xcl/src/gpu/recomp/dxc.rs) with a priority queue (Queue<J>) so DXC compiles that a title thread is actively waiting on (wanted) are never stuck behind queued or long-running background compiles:crates/xcl/src/gpu/recomp/dxc.rs): Workers always pop the oldest currently-wantedjob ahead of background jobs, even on a single-worker pool (XCL_DXC_THREADS=1).state::boot().is_some()andtotal_workers >= 2, background compiles are capped attotal_workers - wanted_reserve(total_workers)(reserving(total / 3).clamp(1, 4).min(total - 1)workers for wanted compiles, while wanted compiles may use any free worker). When no title is running (xcl shaders --precompile),reserveis0so offline precompilation still uses every worker.crates/xcl/src/hle/d3d12x/pso_async.rs): WhenPending::want()flipsdemand.wantedfromfalsetotrue, it drops thedemandlock first (preserving strictqueue -> demandlock order) and callsdxc::notify_wanted()(a no-op if the DXC pool has not been started yet) so any idle reserved worker immediately picks up an already-queued compile.BgSlotguard always decrementsbg_activeand wakes waiting workers on drop, andQueueState::total_workerstracks the actual spawned worker count (closing cleanly if0spawned).dxc::Jobalready carriedwanted: Wantedsowait_for_memorylets title-waited compiles bypass low-commit throttling, butpool()still queued every compile into one FIFOmpsc::channelacross all workers. During retail world load, title threads waiting on compute pipelines can queue behind background DXC compiles for 13–25 s (#1164), contributing to 30 s watchdog terminations (#1452).Tested
32.0.16.1714), Intel Core i5-10400F (12 threads), 16 GB RAM + 43 GB pagefile, Windows 11 Pro Build 26200,rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.8.2502.11(Windows SDK10.0.26100.0), release for focused tests and smoke runs.origin/main2898511(which includes#2420fixing the pre-existinga_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barriertest failure that tripped CI on68a284a).63ea17f(cargo test --release -p xcl --lib -- gpu::recomp::dxc::pool_tests gpu::recomp::dxc::cache_tests hle::d3d12x::pso_async::used_tests a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier --test-threads=1): 31 passed, 0 failed, 0 ignored:gpu::recomp::dxc::pool_tests: 6 passed, 0 failed (wanted_reserve_scales_with_worker_count,wanted_job_jumps_ahead_of_queued_background_jobs,wanted_job_runs_immediately_while_background_workers_are_saturated,queued_background_job_promoted_to_wanted_wakes_reserved_worker,offline_mode_uses_all_workers_for_background_jobs,bg_slot_recovers_after_worker_panic).gpu::recomp::dxc::cache_tests: 11 passed, 0 failed.hle::d3d12x::pso_async::used_tests: 13 passed, 0 failed.gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier: 1 passed, 0 failed.4ac4637(cargo test --workspace --no-fail-fast -- --test-threads=4): 1,295 passed, 1 failed (the pre-existing68a284atest now fixed on2898511), 46 ignored (37SKIPPEDlines on wave32 RTX 3060 / no Windows Developer Mode).Regression run
Paired 60 s retail smoke runs (
.\scripts\smoke.ps1 -Game <retail> -Seconds 60, release build, same title and caches):PR head (
63ea17f):main(2898511):Not tested
dxc::pool_tests).4ac4637to63ea17f(only the 31 targeted tests above + paired 60 s smoke runs were rerun on63ea17f).AI use
Google Antigravity (Gemini 4 Neon) wrote the implementation, unit tests, and this description, rebased cleanly onto
origin/main2898511, and ran the tests and paired smoke runs on this machine; I reviewed and approved before updating.