Repository navigation
D3D12.X: skip repeated exhausted descriptor searches - #2545
jeroenhaentjens wants to merge 1 commit into
Conversation
Unmapped pages retry the same fragmented shared allocator on every lookup, walking both free-range scans again even when no descriptors were released. Remember the smallest failed request per view/sampler pool until a nonzero release. Smaller requests retain first-fit behavior and ordinary allocation cannot make a previously impossible request fit. Four regressions cover search counts, smaller requests, coalescing, cursor straddles, independent pool invalidation and 8192 operations compared with the uncached allocator. The 16 focused tests pass; removing only the cache guard makes both repeated-search regressions fail (14 pass, 2 fail). Motivated by cross-project descriptor-exhaustion reports, including: Belobug/VIctory-Belobug-AMD@788ea46 Implemented independently around XCL's allocator; no external code imported. No retail or frame-time improvement is claimed. Assisted-by: OpenAI Codex (GPT-6; exact deployment variant unavailable)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested: current PR head merged onto current
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. |
Unmapped descriptor pages repeatedly scan the same fragmented shared pool after allocation fails. Remember the smallest failed request separately for view and sampler pools until a nonzero release; smaller requests still use the existing first-fit allocator.
What is in it
console_heap.rs: failure-size caching under the existing pool mutexes, invalidated by both release paths.Tested
XCL_ADAPTER=nvidia.35aaf980394992ca340dc0aa38461ce1daf198cb, based on maine1d84b7:cargo build --workspace --lockedpassed;cargo test --workspace --locked --no-fail-fast -- --test-threads=4exited 0: 1427 reported passes, 0 failures, 46 ignored across 37 completed suites.SKIPPEDrecords: 21 native-wave64, 3 unsupported per-lane FP16/conversion, 1 driver-cache control, 3 debug-layer cases, 1 heap-window case. Reported passes include skipped cases; these and absent game-sample inputs are not coverage.cargo test --locked -p xcl --lib hle::d3d12x::console_heap::tests:: -- --test-threads=4 --nocapture: 16 passed, 0 failed/ignored/skipped. Removing only the cache guard makes both repeated-search regressions fail: 14 passed, 2 failed, exit 101.git diff --checkpassed; independent subagents reviewed allocation invariants, release invalidation and test isolation.Regression run
Not run: no suitable game package available. Remains draft pending paired main/head
scripts/smoke.ps1runs.Not tested
Retail descriptor pressure, gameplay/FPS improvement and AMD hardware. The deterministic regressions establish avoided scans and unchanged allocation results, not a measured world-load improvement.
AI use
OpenAI Codex, GPT-6 (exact deployment variant unavailable), with subagents: implementation, tests, independent reviews and the reported local validation.