D3D12.X: quarantine unmapped parked sparse tiles behind GPU fences #2345
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!2345
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2345/head"
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?
@fixgep on GitHub · 2026-11-25 16:10 UTC · original
fixgep:fix/sparse-flush-parked-quarantine→main· +272 −11 · 1 files · 1 commits · merged 2026-11-25 18:27 UTCQuarantine unmapped parked sparse pool tiles behind completion fences for both
State.queueand active same-device title command queues before returning them toState.free(XCL-BT-009, Part of #1488). Previously,State::flush_parkedunmapped parked tiles onself.queue, signaledself.fence, and immediately pushed unpinned pool tiles toself.free, allowingState::take_tileto pop, remap, and zero/reuse them while prior GPU work or unmapping was still in flight.What is in it
crates/xcl/src/hle/d3d12x/sparse.rs(10e9fb7):RetiredTiles,State.quarantined, and per-queue fence trackingState.queue_fencesState::note_queueandState::sync_known_queues(fed bybefore_execute,readback_after_execute, andsuper::present::known_queues)(self.fence, self.value)plus per-title-queue fence marks inState::quarantine_tilesduringState::flush_parked, drain completed batches toself.freeinState::drain_quarantined(take_tile,decommit_range,before_execute), and keep quarantined tiles excluded inState::release_if_unuseda_tile_decommitted_and_committed_again_keeps_its_video_memoryfor fenced release and add regression testsflush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flightandflush_parked_quarantines_tiles_until_title_queues_finishTested
32.0.15.9144, 32-lane waves), AMD Ryzen 5 7500F 6-Core Processor, Windows 11 Pro (Build26200.9974,25H2),rustc 1.100.0 (0ef1bc386 2026-11-09); DXCdxcompiler 1.9.2602.17 (21d28f72)from Windows SDK10.0.26100.0(tests), DXC1.9.2609.5 (01b62ad4)intarget\release(smoke runs); debug tests + release smoke buildcargo build --workspaceandcargo build --release -p xcl: built with 0 new warnings (only 2 pre-existingfetch_updatedeprecation warnings incrates/xcl/src/hle/d3d12x/real.rsandcrates/xcl/src/hle/xgameruntime/mod.rs)cargo test -p xcl --lib hle::d3d12x::sparse::tests -- --test-threads=4: 17 passed, 0 failed, 1 ignored (early_commit_timing)cargo test -p xcl --lib -- --test-threads=4: 1204 passed, 1 failed (gpu::recomp::tests::gpu_clamp_and_omod_per_instruction, confirmed pre-existing failing identically on unmodifiedmain0829441), 26 ignored (25SKIPPED GPU checks:21no wave64,3refused#1426f16/f32 wave32 per-lane semantics,1cannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --test '*' -- --test-threads=4: 69 passed, 0 failed, 20 ignored (1SKIPPED GPU check:heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)cargo test --workspace --no-fail-fast -- --test-threads=4: 1273 passed, 1 failed (gpu::recomp::tests::gpu_clamp_and_omod_per_instruction), 46 ignored (xcl --lib: 1204/1/26,xcl --bin xcl: 0/0/0,xcl --test '*': 69/0/20,xcl-testtitle: 0/0/0, doctests: 0/0/0;26SKIPPED GPU checks total as listed above)Regression run
main:
PR:
Not tested
26runtime-skipped checks on RTX 3060 wave32 without Windows Developer Mode) and AMD RDNA hardwareXCL_SAMPLE_*tests gated on external game assets (unset)gpu::recomp::tests::gpu_clamp_and_omod_per_instructionfailure left untouched outside scopeAI use
#1488(XCL-BT-009), wrote failing-first unit tests and fenced tile quarantine incrates/xcl/src/hle/d3d12x/sparse.rs, ran test suites and 60 s smoke comparisons, and validated the PR description againstscripts/pr_check.py(upstream/main).@Aniseto on GitHub · 2026-11-25 16:21 UTC · original
Ran the sparse tile quarantine tests at
10e9fb7:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
Both new regression tests pass here, along with the existing
a_tile_decommitted_and_committed_again_keeps_its_video_memory. The ignored one isearly_commit_timing, unchanged from the author's run.What this adds: the author ran this filter on an Ampere RTX 3060 with DXC 1.9.2602.17 for tests; this is a Blackwell wave32 part with DXC 1.9.2609.5. No test report from another machine exists in the thread yet.
Not tested: the whole workspace suite, a 60 s paired smoke run, native wave64, heap-window fallback, AMD and Intel GPUs, Wine, release profile, title data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
@amazedturnip on GitHub · 2026-11-25 16:23 UTC · original
Independent AMD Radeon (native wave64) verification of exact head
10e9fb761fbf19c4b8e0e8fa745835d8127732ee(clean detached worktree, compared againstmain3f4495a2b325).Tested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)(XCL_ADAPTER=radeon, native wave64)cargo test -p xcl --lib hle::d3d12x::sparse -- --test-threads=2— 17 passed, 0 failed, 1 ignored (exit 0)Regression run (
scripts/smoke.ps1 -Seconds 60, release build,XCL_ADAPTER=radeon)main:
PR:
Not tested
AI use
@SlopTart on GitHub · 2026-11-25 16:49 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).No Linux/Wine report in the thread yet; adding one (Aniseto and amazedturnip cover native Windows here).
gpu_suite (--release --locked,--test-threads=2): 144 passed / 3 failed / 1 ignored, identical to this rig's plainorigin/mainbaseline (known set: fuzz seed 1003 of #2115,gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed). No delta from the PR.gpu_filter), targeted:flush_parked_does_not_free_or_reuse_tiles_while_unmap_is_in_flightandflush_parked_quarantines_tiles_until_title_queues_finish: both pass (2 passed; 0 failed).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.
@DavidM1911 on GitHub · 2026-11-25 18:25 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!