D3D12.X: release retired sparse heaps on ordinary submits #1837
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!1837
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1837"
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?
@gloger2003 on GitHub · 2026-11-24 21:38 UTC · original
gloger2003:fix/reap-retired-sparse-pools→main· +38 −7 · 1 files · 1 commits · openPart of #1773. Sparse heaps pending release used to be revisited on submission only when the submission unmaps parked tiles. A steady workload could keep submitting commands after the heap's fence and reuse delay had passed while the heap remained held.
What is in it
Tested
Regression run
Minecraft Preview, identical 1x MSAA profile.
Not tested
AI use
@frenziedcoder on GitHub · 2026-11-24 22:20 UTC · original
NVIDIA test report for
ec610d9: full suite green, no own test to run, and a clean smoke pair on the retail title (1657 vs 1653 frames).Tested
stable-x86_64-pc-windows-msvc, DXC 1.8.2502.11 (SDK 10.0.26100.0). Exact headec610d9771c0e56b7ceacda6648ec27925160f11, no local changes.cargo build --workspace && cargo test --workspace -- --test-threads=4(debug): 891 passed, 0 failed, 42 ignored; the PR adds no test of its own. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).test_title_draws_with_a_root_signature_under_the_debug_layerreports ok, but this machine has no D3D12 debug layer (debug layer requested but unavailable … (0x887A002D)), so it ran without the layer and is no evidence either way.Regression run (
scripts/smoke.ps1 -Seconds 60, release, the retail title of #505 at its start screen;XCL_PSO_PRELOAD=0for both builds, because this machine's preload list holds the program of #1307)base (
4178e88, this PR's merge base withmain):this PR:
Not tested: the world load (the smoke runs stop at the start screen, so code that only runs later is not exercised there); AMD.
AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it.
@DavidM1911 on GitHub · 2026-11-25 01:03 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 03:14 UTC · original
PR #1837 — D3D12.X retired sparse heaps on ordinary submits
Tested detached head
ec610d9771c0e56b7ceacda6648ec27925160f11on STOR-WINLAB. The sparse-heap regression test passed in both runs. The workspace suite exited 101.Environment
Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave range 8–32,
DoublePrecisionFloatShaderOps=0). The D3D12 SDK debug layer was unavailable. Rust 1.100.0 (0ef1bc386), DXC/DXIL 1.9.2609.5, unoptimized builds with debug info and incremental compilation disabled.XCL_ADAPTER=A770.Tested
cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the GPU lock.cargo test -p xcl --lib hle::d3d12x::sparse::tests:: -- --test-threads=1under the Arc lock produced 14 passed, 0 failed, 1 ignored, 0 SKIPPED lines.a_pool_retired_a_moment_ago_is_taken_backchecked that submit preparation with no parked mappings retains a recent pool and an expired pool with an incomplete fence, then releases the expired pool when the fence completes. This test uses the default D3D12 device with a WARP fallback and does not log its adapter.cargo test --workspace --no-fail-fast -- --test-threads=4ran once under the Arc lock. The 20 summaries inpr1837-suite.logtotal 873 passed, 18 failed, 42 ignored. The log contains 4 SKIPPED lines, which are excluded from coverage claims.Failures and skips
0x80070057), including FP64 tests. Four shader assertions covered FMA overflow, implicit mip LOD, FP16 high-half preservation, and pixel wave reductions.RSSetDepthBiasX, #94) read blue where it expected green.0x887A002D).Not tested
No
maincomparison to attribute the suite failures, retail title smoke run or memory measurement, sample-backed coverage (XCL_SAMPLE_*unset), or other adapters.AI use
T3 Code / Codex (
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr1837-suite.logand published this report.@pickles976 on GitHub · 2026-11-25 17:01 UTC · original · edited 2026-11-25 17:25 UTC
Wine / RTX 4060 Laptop verification of
ec610d9771c0e56b7ceacda6648ec27925160f11, combined with #1838 at2e56d37f1dbd27e1a004b556f4e2192f41f065e8.Tree and host: ports onto the mixed integration described in my #751 report, including that Wine guard-page correction; not either clean PR head. I retained the integration's existing
lock_state()wrapper. Linux 6.17.0-40-generic, Wine 11.0, stock/assert-enabled vkd3d-proton 3.2.0 (2576c0b4adfae4a), NVIDIA 590.48.01, RTX 4060 Laptop 8 GB, i7-13620H, 16 GB RAM, Rust 1.98.1 MSVC cross-build.Focused regression:
cargo test -p xcl --lib --target x86_64-pc-windows-msvc a_pool_retired_a_moment_ago_is_taken_back -- --test-threads=1 --nocapturepassed 1/1, no failures/ignores/skips. The log identifies the NVIDIA RTX 4060 Laptop and vkd3d 3.2. The unchanged upstream additions cover retaining a recent heap, retaining an expired heap while its fence is incomplete, releasing it on an ordinary submit after fence completion, and #1838's active/occupied/retired accounting across reuse and release. Release build passed. No full-suite claim.Bounded title loading: saved setup profile, warm caches, Lockhart profile,
XCL_COHERENT_MB=3408 XCL_DEFER_PRIVATE_HOME_TILES=1 XCL_PSO_PRELOAD=1 XCL_ACTIVITY=1, scripted A at 40/55 seconds. The external RAM guard stopped this run at the last sample of 68.60 s, with 1,760.6 MiB available RAM (2,048 MiB guard), 6,145 MiB GPU usage, and 13.302 GiB disk free. Peak sampled GPU usage was 6,209 MiB. Launcher exit 143 was our guard stop, not an observed crash. No unhandled-exception/device-loss/OOM marker in the log; other display/pipeline diagnostics remain.The new accounting produced 33 samples. Retired capacity changed through
0 → 192 → 384 → 128 → 0 → 64 → 0 → 64 → 0 MiB; parked-mapping coverage peaked at 164 MiB. This shows the counters changing and returning to zero, not that this title exercised the specific no-parked-mappings regression path; the fixture covers that path.Limits: host workload changed during the run, and this stopped earlier than the preceding VRAM-limited run. This is not a comparable memory/performance A/B result, a measured memory saving, gameplay, or a 15-minute stability result. I did not weaken either resource guard.
AI assistance: omp / openai-codex/gpt-6-astra ported and tested the existing PRs, inspected the measurements, and drafted/submitted this report at the repository owner's request.
Follow-up: restored system-RAM headroom
Repeated the same local integration after the user closed Firefox: available RAM at launch 12,410.7 MiB, board VRAM 186 MiB. This time the guard stopped at 110.45 s / 7,542 MiB VRAM, with 2,932.2 MiB RAM available and 13.399 GiB disk free (launcher 143). It was the VRAM threshold, not the previous RAM stop. No unhandled-exception/device-loss/OOM markers were found in the console log; untranslated mesh-pipeline errors still occur.
Adjacent memory diagnostics show retired heaps 384 → 0 MiB, with DXGI local usage 6,961 → 6,581 MiB. Later, render-target pages reached 2,409 MiB in 2,624 MiB pools; active sparse pools were 3,648 MiB, with 2,411 MiB occupied, zero parked mappings and zero retired. Thus completed-heap reclamation is observable, but this integration still does not fit the loading phase inside the 7,500 MiB board-VRAM safety threshold. The unused capacity inside active sparse pools is distinct from retired heaps.
No 15-minute gameplay or 30-fps claim. The two runs are not a controlled performance comparison; closing the browser changed host load.
@ClosetPie107 on GitHub · 2026-11-25 17:42 UTC · original
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head
ec610d9771c0e56b7ceacda6648ec27925160f11(merged locally ontomain68a284a, clean merge).Hardware & environment
experimental-11.0-20261112),vkd3d-protonmasterec207194(3.2.0) +dxil-spirvb540c8a2+ relaxed-vtable patch (-Db_ndebug=true), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug)Tested (
XCL_REQUIRE_GPU=wave64,VKD3D_CONFIG=ignore_shared_fence,--test-threads=1 --nocapture)hle::d3d12x::sparse::tests: 15 passed, 0 failed, 1 ignored (0 skipped, peak VRAM 1,638 MiB)Not tested
AI use
@lewisnic94-max on GitHub · 2026-11-25 00:18 UTC · original · reviewed
I reviewed
ec610d9771c0e56b7ceacda6648ec27925160f11. The ordinary-submit path retained a recently retired sparse pool for reuse. After the fixture aged the pool past the two-second window, a submit with no parked mappings still retained it while its fence was pending. Signalling the recorded fence value let the next ordinary submit release it. I found no actionable defect in these retirement and fence transitions.cargo test --offline --locked -p xcl --lib hle::d3d12x::sparse::tests -- --test-threads=1reported 14 passed, 0 failed, 1 ignored (early_commit_timing), and 0 skip notices. Windows 11 build 26200.9974, Ryzen 7 5800X, RTX 3080 driver 616.92, debug MSVC Rust 1.100.0. This synthetic test did not measure long-running title residency or sustained VRAM pressure.Codex (GPT-6) traced the release and reuse paths, ran the sparse suite and checked the fence assertions.
@Anon64 on GitHub · 2026-11-26 12:17 UTC · original · edited 2026-11-26 12:33 UTC
A data point for why this matters on 12 GB cards, and a request for a rebase. On an RTX 3060 12 GB with a newer retail title (
nvidia-devaf2cecc4plus #2357 and #2630 merged locally, target pages capped at 4 GB), the sparse pools grow from 1.8 GB at 60 s to 4.35 GB at about 300 s into the world load. Local video memory then reaches 12.7 GB against a 10.7 GB DXGI budget, which is the last thing over budget on this card (details on #2688 and #2357).I wanted to measure this PR in the same run, but
ec610d9no longer merges into that tree: both conflicts are insparse.rs, inretire_free_pools(rewritten by #2630) and in the submit path (restructured since this PR). I would rather not resolve them by hand and post numbers from a merge you did not write. If you rebase onto currentmain, I will run it in the world on this card and post thememory:lines (XCL_ACTIVITY=1) next to a run without it.AI use: Claude Code (Claude Opus 5.5) did the merge attempt and the earlier runs on this machine and wrote this comment.
Correction to my comment above: looking at the
memory:lines of that run again, the sparse pools are almost all mapped tiles at every point (1,811 of 1,812 MB at 161 s, 2,800 of 2,816 MB at 275 s). Retiring free pools, which this PR speeds up, can only reclaim the few tens of MB that are free, so this PR is unlikely to change the over-budget result on this card. The rebase would still let me check that, but it is not the fix for that case; please do not rebase on my account. Details on #2688.AI use: Claude Code (Claude Opus 5.5) read the logs and wrote this comment.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.