Repository navigation
D3D12.X: bound target-page pools by title and adapter VRAM budgets - #2357
safesearch77 wants to merge 1 commit into
Conversation
a41a858 to
889008f
Compare
|
Windows / AMD RDNA2, 12 GB card + 16 GB RAM: exact head Tested
Regression run
main: PR: Title A/B on the head, cap on (default) vs
Not tested
AI use
|
|
I tested
No retail run. AI use — Codex added the two local test probes, ran the tests, analyzed the results, and assisted in drafting this report. |
|
A test where the cap engages on the retail title: on NVIDIA under Linux, one of the two runs with this PR ended in a GPU page fault from the copy engine, and the other had fewer frames and about half the draws of the two runs without it. Tested
Run 4's kernel line: After the world load (runs 1–3): 1.45 presents/s, 234 draws/s with the cap; 1.65–1.73 presents/s, 561–574 draws/s without. Peak GPU memory 15.3 GB with the cap against 15.8 GB (full) without; system memory and swap about the same. The frames I dumped are loading screens in all four runs and look the same. Not tested: Windows; Series X mode (there the cap would be ~12 GB here, above the ~10.5 GB the pools reach, so it would not engage); the test suite on this tree with the PR; whether the copy that faulted is an upload, a readback or a title copy. AI-assisted. Claude Code, Claude Opus 5.5 made the runs and wrote this comment. |
|
Diff review on Remaining before merge:
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
NVIDIA RTX 3060 12 GB (the #646 card), retail title 1.0.2.1 into its story load: the cap holds – pools stop at 8 448 MB and target pages at 8 404 MB, against 9 984 / 9 644 MB on the base, and local video memory ends 1.46 GB lower. No Setup: NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (wave32), Ryzen 5 5600X, 32 GB RAM, Windows 11 Pro 10.0.26300.9974, Rust 1.100.0, release builds, DXC 1.9.2609.5. Head Head's startup line: Regression run Base Head Head 108 % of base frames, 91 % of its peak commit.
Tested
Not tested
AI use
|
|
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. |
bmjask
left a comment
There was a problem hiding this comment.
P2: VRAM cap accounting excludes fence-retiring heaps. The cap checks active pools.len() (vram.rs:967/bind allocation), but sweep_and_reclaim removes empty pools from active state before queuing their heaps in retiring until both fences complete. New allocations then see a free cap slot; repeated reclaim/allocate while fences lag can exceed the configured cap by all retired heaps. Count active plus retiring residency, or retain cap capacity until retirement completes, with a blocked-retire-fence test. P2: eager partial binds still set Target.mapped=true when cap pressure leaves some tiles NULL. remap_if_unmapped then returns immediately, so later freed tiles never fill those eager missing pages. Track missing tiles/retry them, or leave partial targets unmapped; add a recovery-after-budget-frees test.
|
RTX 3080 10 GB: with this PR the retail title no longer loses its device at world load. 6 of 6 runs reached 100 s against 0 of 6 without it. Setup
Results
One longer run of head + #684 with no Without #684, head got past the removal but every run (7 of 7) then crashed at 74–80 s in Why the removal is out of memory Not tested
AI use: Claude Code (Claude Opus 5.5) made the builds, ran the runs and the probe on the hardware above, and wrote this. |
|
Tested on an RTX 3060 12 GB with 32 GB of RAM in a retail world load (the case "Not tested" asks for): the cap holds, but on a 12 GB card 75 % of the budget still leaves the process about 3 GB over it. Setup: RTX 3060 12 GB, NVIDIA 581.80, i9-14900KF, 32 GB RAM, Windows 11 26200, release build. The PR's head Video memory from the 2 s
How far each got. None of the three lost the device; all ended on the title's own watchdog when its submits stopped while pipelines were still being built, which is not this PR's code. The first What the cap costs and what it does not cover, from that 298.9 s run:
Not tested: the PR's exact head or AI use: Claude Code (Claude Opus 5.5) merged the branch locally, ran the runs on this machine and wrote this report. |
889008f to
c6213b2
Compare
|
Rebased onto
Huge thanks to AI use: Antigravity (Gemini 4 Carbon) |
|
Windows/NVIDIA check of current head One remaining cap-accounting interleaving in the new revision: AI use: Codex (GPT-6.2 Sol) inspected the revision, ran the tests, and drafted this report; I checked the review point against the code. |
|
Follow-up to my exact-head report: I reproduced the narrow cap handoff race on an RTX 3080 Ti using a gated GPU regression. The test pauses The candidate reserves reclaimed pool capacity while Tested: Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, DXC 1.8.2502.11. Not tested: paired retail-title smoke, AMD and Intel GPUs. AI use: Codex (GPT-6.2 Sol) wrote and ran the regression and candidate; Codex (GPT-6.2 Astra) reviewed the lock and test-lifecycle paths. I checked each point against the code and test output. Candidate diff against c6213b2diff --git a/crates/xcl/src/hle/d3d12x/vram.rs b/crates/xcl/src/hle/d3d12x/vram.rs
index 892e4557..1ab348f6 100644
--- a/crates/xcl/src/hle/d3d12x/vram.rs
+++ b/crates/xcl/src/hle/d3d12x/vram.rs
@@ -1479,11 +1479,12 @@ struct RetireQueue<H, F> {
fences: std::collections::HashMap<usize, (F, u64)>,
batches: Vec<RetiringBatch<H, F>>,
retiring_pools: usize,
+ pending_pools: usize,
}
impl<H, F: Clone> RetireQueue<H, F> {
fn new() -> Self {
- Self { fences: std::collections::HashMap::new(), batches: Vec::new(), retiring_pools: 0 }
+ Self { fences: std::collections::HashMap::new(), batches: Vec::new(), retiring_pools: 0, pending_pools: 0 }
}
/// Seal `heaps` behind `unmap_mark` and one fence signal per queue (signaled BEFORE queueing).
@@ -1513,6 +1514,8 @@ impl<H, F: Clone> RetireQueue<H, F> {
fn retiring_pools(&self) -> usize { self.retiring_pools }
+ fn counted_pools(&self) -> usize { self.retiring_pools.saturating_add(self.pending_pools) }
+
fn note_queued_pools(&mut self, pool_heaps: usize) {
if let Some(b) = self.batches.last_mut().filter(|_| pool_heaps > 0) {
debug_assert!(b.pool_heaps + pool_heaps <= b.heaps.len());
@@ -1543,15 +1546,15 @@ unsafe impl Send for RetireQueue<ID3D12Heap, ID3D12Fence> {}
static RETIRE: Mutex<Option<std::collections::HashMap<usize, RetireQueue<ID3D12Heap, ID3D12Fence>>>> = Mutex::new(None);
static RETIRING_BATCHES: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);
+#[cfg(test)]
+static RECLAIM_GAP: Mutex<Option<(usize, std::sync::mpsc::Sender<()>, std::sync::mpsc::Receiver<()>)>> = Mutex::new(None);
fn retiring_pool_heaps_count(dev_key: usize) -> usize {
- if RETIRING_BATCHES.load(std::sync::atomic::Ordering::Acquire) == 0 { return 0; }
let g = RETIRE.lock().unwrap();
- g.as_ref().and_then(|m| m.get(&dev_key)).map_or(0, RetireQueue::retiring_pools)
+ g.as_ref().and_then(|m| m.get(&dev_key)).map_or(0, RetireQueue::counted_pools)
}
unsafe fn poll_retiring_pool_heaps(dev_key: usize) -> (usize, bool) {
- if RETIRING_BATCHES.load(std::sync::atomic::Ordering::Acquire) == 0 { return (0, false); }
let (done, remaining) = {
let mut guard = RETIRE.lock().unwrap();
let Some(rq) = guard.as_mut().and_then(|m| m.get_mut(&dev_key)) else { return (0, false) };
@@ -1559,7 +1562,7 @@ unsafe fn poll_retiring_pool_heaps(dev_key: usize) -> (usize, bool) {
let done = rq.reap_completed(|f| f.GetCompletedValue());
let delta = before - rq.batches.len();
if delta > 0 { RETIRING_BATCHES.fetch_sub(delta, std::sync::atomic::Ordering::AcqRel); }
- (done, rq.retiring_pools())
+ (done, rq.counted_pools())
};
let freed_pool = done.iter().any(|b| !b.heaps.is_empty() && b.pool_heaps > 0);
drop(done);
@@ -1606,6 +1609,8 @@ unsafe fn retire_heaps_and_sweep(
let rq = map.entry(dev_key).or_insert_with(RetireQueue::new);
let before = rq.batches.len();
let immediate = rq.retire_with(newly_reclaimed, unmap_mark, &queues, || dev.CreateFence::<ID3D12Fence>(0, D3D12_FENCE_FLAG_NONE).ok(), |q, f, v| q.Signal(f, v).is_ok());
+ debug_assert!(rq.pending_pools >= pool_heaps);
+ rq.pending_pools -= pool_heaps;
if immediate.is_empty() {
rq.note_queued_pools(pool_heaps);
}
@@ -1644,12 +1649,29 @@ pub(super) unsafe fn before_execute(queue: &ID3D12CommandQueue) {
do_reclaim = true;
newly_reclaimed = pages.sweep_and_reclaim(now);
if !newly_reclaimed.is_empty() {
+ let mut retire = RETIRE.lock().unwrap();
+ let rq = retire.get_or_insert_with(std::collections::HashMap::new)
+ .entry(dev_key).or_insert_with(RetireQueue::new);
+ rq.pending_pools += newly_reclaimed.len();
unmap_mark = Some((pages.fence.clone(), pages.value));
}
}
}
}
let reclaimed_pools = newly_reclaimed.len();
+ #[cfg(test)]
+ if reclaimed_pools > 0 {
+ let gate = {
+ let mut hook = RECLAIM_GAP.lock().unwrap();
+ if hook.as_ref().is_some_and(|(key, _, _)| *key == dev_key) { hook.take() } else { None }
+ };
+ if let Some((_, reached, resume)) = gate {
+ if reached.send(()).is_ok() {
+ resume.recv_timeout(std::time::Duration::from_secs(5))
+ .expect("reclaim test hook was not resumed");
+ }
+ }
+ }
if do_reclaim {
newly_reclaimed.extend(ARENAS.lock().unwrap().sweep_dropped_for(dev_key, now));
}
@@ -2075,6 +2097,79 @@ mod tests {
);
}
+ #[test]
+ fn reclaimed_pool_still_counts_before_retirement_is_queued() {
+ let _vram_guard = VRAM_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner());
+ use windows::Win32::Graphics::Direct3D::D3D_FEATURE_LEVEL_11_0;
+ unsafe {
+ let Ok(dev) = crate::gpu::agility::create_device(None, D3D_FEATURE_LEVEL_11_0) else {
+ return crate::gpu::recomp::runner::skip_test("no GPU");
+ };
+ let Some(mut pages) = Pages::new(&dev) else {
+ return crate::gpu::recomp::runner::skip_test("no GPU");
+ };
+ let spare = keep_spare_pools();
+ if spare > 2 { return crate::gpu::recomp::runner::skip_test("spare pool override > 2"); }
+ let cap = spare + 1;
+ for _ in 0..cap {
+ let heap = alloc_pool_heap(&dev).unwrap();
+ let slot = pages.pools.push_heap(heap);
+ pages.pool.add_heap_at(slot, POOL_PAGES);
+ }
+ pages.max_pools = cap;
+ pages.last_reclaim = Instant::now() - Duration::from_secs(2);
+ let queue = pages.queue.clone();
+ let dev_k = dev.as_raw() as usize;
+ let previous_retire = RETIRE.lock().unwrap().as_mut()
+ .and_then(|map| map.remove(&dev_k));
+ let previous = PAGES.lock().unwrap().insert(dev_k, Some(pages));
+ let (reached_tx, reached_rx) = std::sync::mpsc::channel();
+ let (resume_tx, resume_rx) = std::sync::mpsc::channel();
+ *RECLAIM_GAP.lock().unwrap() = Some((dev_k, reached_tx, resume_rx));
+ let worker = std::thread::spawn(move || before_execute(&queue));
+ let reached = reached_rx.recv_timeout(Duration::from_secs(5)).is_ok();
+ let (active, counted, replacement) = if reached {
+ let mut g = PAGES.lock().unwrap();
+ let p = g.get_mut(&dev_k).unwrap().as_mut().unwrap();
+ let active = p.pools.len();
+ let counted = retiring_pool_heaps_count(dev_k);
+ let replacement = alloc_budgeted_pool(
+ &dev, dev_k, cap, &mut p.oom_until, &mut p.pools, Instant::now(),
+ );
+ (active, counted, replacement)
+ } else { (0, 0, None) };
+ let _ = resume_tx.send(());
+ worker.join().unwrap();
+ *RECLAIM_GAP.lock().unwrap() = None;
+ let pages = PAGES.lock().unwrap().remove(&dev_k).flatten();
+ if let Some(previous) = previous { PAGES.lock().unwrap().insert(dev_k, previous); }
+ drop(pages);
+ let marks = {
+ let g = RETIRE.lock().unwrap();
+ g.as_ref().and_then(|m| m.get(&dev_k)).map(|rq| {
+ rq.batches.iter().flat_map(|b| b.marks.iter().chain(b.unmap_mark.iter()).cloned())
+ .collect::<Vec<_>>()
+ }).unwrap_or_default()
+ };
+ for (f, v) in marks { crate::gpu::fence::wait(&f, v, &dev, None, 5_000).unwrap(); }
+ let _ = poll_retiring_pool_heaps(dev_k);
+ let remaining_batches = {
+ let mut guard = RETIRE.lock().unwrap();
+ if let Some(m) = guard.as_mut() {
+ let ours = m.remove(&dev_k);
+ let remaining = ours.as_ref().map_or(0, |rq| rq.batches.len());
+ if let Some(old) = previous_retire { m.insert(dev_k, old); }
+ remaining
+ } else { 0 }
+ };
+ assert_eq!(remaining_batches, 0);
+ assert!(reached, "before_execute did not reclaim the empty pool");
+ assert_eq!(active, cap - 1);
+ assert_eq!(counted, 1, "the reclaimed pool must remain reserved during handoff");
+ assert!(replacement.is_none(), "a pool still live behind retirement fences cannot free cap capacity");
+ }
+ }
+
#[test]
fn capped_pages_keep_over_budget_placements_alive() {
let _vram_guard = VRAM_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner()); |
c6213b2 to
55ab6ba
Compare
|
Great catch and clean GPU repro on that Squashed into
Waiting on a 60 s AI use: Antigravity (Gemini 4 Carbon) |
|
Review of current head 55ab6ba0. I checked these source paths against the current diff; these are review findings, not title-run results.
AI use: Codex (GPT-6.2 Sol) traced and reviewed these paths and drafted this comment. I checked each point before posting. |
|
Independent Windows/NVIDIA test of PR head
Not tested: the required fresh 60-second retail smoke pair, AMD, and Linux/Wine. This report does not satisfy the PR's smoke gate. AI use: Codex (GPT-6.2 Sol) ran the tests, checked the exact commits and counts, and drafted this report. |
`vram::Pages` backed GPU-owned targets (`vram::place`) and placed sampled textures (`vram::place_pages`) with 64 MiB `HEAP_TYPE_DEFAULT` pool heaps without checking `Config::title_memory_budget_mb()` or DXGI local video-memory budgets (`DXGI_MEMORY_SEGMENT_GROUP_LOCAL`): 1. `target pages` climbed past 9,521 MB even with `title_memory_mb = 4096` (xcl-dev#646), pushing WDDM into local-VRAM overcommit / PCIe thrash TDRs (`0x887a0007`) and multi-30 GB system commit on 8 GB and 12 GB GPUs (xcl-dev#1337, xcl-dev#1773). 2. When `alloc_pool_heap` returned `None` on `CreateHeap` OOM, `place_on_pages` destroyed the already-created Tier-2 reserved `ID3D12Resource` and returned `None`, spilling into unbudgeted arenas or committed resources until `CreatePlacedResourceX` failed with `E_OUTOFMEMORY` (`0x8007000E`) at `+0x193e00f` (xcl-dev#333, xcl-dev#1337). Bound `Pages` pool creation to `min(title_memory_mb, 75% of DXGI local budget)` on discrete adapters and `title_memory_mb` on UMA adapters by default (overridable via `XCL_TARGET_PAGES_MB`, `0` = uncapped), back off failed `CreateHeap` calls for 1s until a pool heap is reclaimed or retired, and keep over-budget Tier-2 reserved placements alive: - Explicitly bind unbacked (`None`) tile spans with `D3D12_TILE_RANGE_FLAG_NULL` (including 0-tile placements via `pHeap = None`) so `vkd3d-proton` emits `VK_NULL_HANDLE` sparse binds instead of leaving newly created reserved tiles uninitialized on Linux/NVIDIA copy queues. - Partition per-slice `D3D12_PACKED_MIP_INFO` (`StartTileIndexInOverallResource` and `NumTilesForPackedMips` per array slice, plus single shared tails) into atomic packed groups kept whole (never partially mapped) ahead of round-robin coarsest standard mips across every slice, returning any unused tiles when a multi-tile packed group does not fit. - Track incomplete active eager and `XCL_TEXTURE_LEVEL_PAGES=1` lazy- level placements in `title_textures` so normal `refresh` / `upload_all` backfills missing tiles or pending level groups once pool capacity frees up and invalidates `LAST_CONTENT` when new tiles/levels map (preventing `same_as_last_upload` from swallowing identical-byte retries while still skipping unchanged submits when capped). - Track pending and fence-retiring 64 MiB pool heaps separately from variable-sized `Arenas` heaps in `RetireQueue` (`active + pending + retiring < max_pools` and `page_bytes()`), reserving reclaimed pool capacity before releasing `PAGES.lock()` in `before_execute` and polling completed retirements before refusing allocation at cap. Part of xcl-dev#1833 (xcl-dev#333, xcl-dev#646, xcl-dev#1337, xcl-dev#1773). Assisted-by: Antigravity (Gemini 4 Carbon)
55ab6ba to
af3ebe9
Compare
|
Thank you for the thorough review on
Waiting on a Windows GPU suite + 60 s AI use: Antigravity (Gemini 4 Carbon) |
|
Windows/NVIDIA follow-up on current head
I also attempted the required Not tested: AMD, Intel, Linux/Wine, retail world-load or gameplay under this head. No title files or diagnostics are attached. AI use: Codex (GPT-6.2 Sol) ran and checked these tests and drafted this report. |
|
Partial RX 9070 / Linux-Wine verification of head Tested RX 9070 (RADV GFX1201), Mesa Separate source copies and targets, built with
The VRAM selection explicitly excluded the existing The passing VRAM selection includes the new budget arithmetic, packed-group allocation, retirement accounting and native pool-cap tests. I then reran A separate query-only fixture called the actual budget-selection function on the initialized native device:
The default query recorded DXGI local budget Blocked coverage Both new recovery tests reached The old Four initial failures in the locally added query fixture came from requesting the device before initializing the backend. I corrected that fixture, preserved its source/binary/log evidence, and reran all four queries. No production code or original assertion was changed. The blocked recovery path was not investigated further. Environment: Not tested Successful eager/lazy recovery readbacks under Wine, a full workspace suite, retail data, smoke/world-load runs, actual VRAM pressure or OOM, title-level cap behavior, VRAM savings, performance/FPS, or other GPUs/native Windows. This is a limited test report, not a clean-suite or merge-readiness claim. AI use OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the full diff, prepared test-only observations and the query fixture, ran the tests, independently checked source/binary hashes, failure boundaries, adapter identity and budget arithmetic, and wrote this report. Publication authorized by the account owner. |
|
Independent native Windows validation of #2357 at Tested
Not tested
AI use Codex GPT-6.2 ran the builds and validation, reconciled the result counts with the logs, and prepared this report. |
Bound
vram::Pages64 MiB pool-heap growth byConfig::title_memory_budget_mb()and DXGI local VRAM budget, and keep Tier-2 reserved resources alive with explicitD3D12_TILE_RANGE_FLAG_NULLpartial tile mappings when capped or out of VRAM instead of destroying them and failingCreatePlacedResourceXwith0x8007000E.Part of #1833
Part of #646
Part of #333
Part of #1337
Part of #1773
What is in it
crates/xcl/src/hle/d3d12x/vram.rs:compute_max_pools/target_pages_max_pools: cap 64 MiBPoolHeapsatmin(title_memory_budget_mb(), 75% of DXGI local VRAM budget)on discrete GPUs (5,056 MiB/ 79 pools on 8 GB GPUs;4,096 MiB/ 64 pools on#646Run 2), usetitle_memory_budget_mb()onUMAadapters so small BIOS carve-outs are ignored, and supportXCL_TARGET_PAGES_MB(0= uncapped).alloc_budgeted_pool&RetireQueuepool accounting (RetiringBatch::pool_heaps,pending_pools,counted_pools,reserve_pending_pools,note_queued_pools,reap_completed,poll_retiring_pool_heaps,page_bytes): count both pending-handoff (before_executewhilePAGES.lock()is still held) and fence-retiring 64 MiB pool heaps separately from variable-sizedArenasheaps sharingRetireQueue(active + pending + retiring < max_pools), and poll/reap fence-completed retirements before refusing pool allocation at cap.TileShape::from_tiling,packed_and_standard_layout,TilePool::take_up_to,Pages::bind_tiles,Pages::rebind,backfill_incomplete_state,available_tiles, &map_levels: reuse 100% of already-resident shared pages at cap, partition per-sliceD3D12_PACKED_MIP_INFO(StartTileIndexInOverallResource+NumTilesForPackedMipsper array slice, plus single shared tails) into atomic packed groups kept whole (never partially mapped, returning any unusedfreshtiles toTilePool), prioritize coarsest standard mips round-robin across slices, resolvedesc.MipLevels == 0, and report unmapped lazy-level groups + minimum fresh tiles needed to advance.TileRange::Null,heap_ranges&Pages::map: explicitly bind unbacked (None) tile spans withD3D12_TILE_RANGE_FLAG_NULLon the first heap pass (preserving trailingNullspans) and emit apHeap = NoneD3D12_TILE_RANGE_FLAG_NULLmapping +pages.fenceSignalwhen0tiles are backed, ensuringvkd3d-protonemitsVK_NULL_HANDLEsparse binds instead of leaving newly created reserved tiles uninitialized on Linux/NVIDIA copy queues.crates/xcl/src/hle/d3d12x/title_textures.rs:Incomplete(Eager/Lazy),refresh_once,upload_all, &map_levels_with_texels: track active incomplete eager andXCL_TEXTURE_LEVEL_PAGES=1lazy-level textures so normalrefresh/upload_allretries missing tiles or pending level groups oncevram::available_tilesmeetsmin_tiles(without spinning while capped, and self-pruning onnote_gpu_write, shadowing,retire_overlapping, andforget), and clearLAST_CONTENTwhenever new tiles/levels map sosame_as_last_uploadnever swallows identical-byte retries.vram::testsandtitle_textures::tests(target_pages_budget_respects_env_title_memory_uma_and_adapter_vram,budgeted_bind_shares_pages_retains_cubemap_coarse_mips_and_recovers_after_free,retire_queue_pool_cap_counts_retiring_pools_ignores_arenas_and_polls_completion,reclaimed_pool_still_counts_before_retirement_is_queued,capped_pages_keep_over_budget_placements_alive,capped_eager_placed_texture_recovers_on_upload_after_capacity_frees,capped_lazy_level_texture_retries_same_bytes_after_capacity_frees, and extendedtile_ranges_per_heap).The diff adds 743 net non-test runtime lines (
602invram.rs,141intitle_textures.rs) alongside ~920 lines of pure-CPU and D3D12 GPU upload/readback/concurrency regression tests requested during review; the budget formula,FLAG_NULLsparse binding, atomic per-slice packed groups, pending + retiring pool-cap accounting, and active eager/lazy recovery stay in one commit because cappingPageswithout those invariants leaves incomplete or partially packed textures unrecoverable.Tested
af3ebe93cf6df094dc359439f02d377f3196484d(onorigin/main8b957bec) on Linuxx86_64withcargo check --offline --target x86_64-pc-windows-gnu --workspace --tests(0errors,0warnings invram.rsortitle_textures.rs; only8b957bec's 2 pre-existingfetch_updatedeprecation warnings), and ran the 14 pure-CPUvram::testsnatively viarustc --edition 2021 --test(14 passed; 0 failed: budget matrix,FLAG_NULLtile ranges, 6-face per-slice packed mips3, 7, 11, 15, 19, 23, 2-tile atomic packed group under 1-tile budget,SINGLE_MIPTAIL_BIT, partial/0-tile backfill, andRetireQueuepending + retiring pool-cap vsArenasaccounting).55ab6ba0(@thehollowedone, #2357 (comment)): NVIDIA GeForce RTX 3080 Ti (driver621.35), Ryzen 7 9800X3D, Windows 1126300,rustc 1.99.1MSVC, DXC1.8.2502.11—reclaimed_pool_still_counts_before_retirement_is_queued(1/1),capped_pages_keep_over_budget_placements_alive(1/1), andcargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4(1,439 passed,1pre-existing8b957becmesh-cache failure,47 ignored).889008fd:@Haxodius(#2357 (comment)): AMD Radeon RX 6700 XT 12 GB —1283 passed,1pre-existing fuzz seed,46 ignored, plus 60 s smoke pair below.889008fd: RTX 3080 10 GB world-load0/6->6/6surviving (@Berserker64), RTX 3060 12 GB-1.46 GBlocal VRAM (@jennydeth, plus298.9 satXCL_TARGET_PAGES_MB=4096vs4/4losses without#2357,@Anon64), RX 6600 XT 8 GB capped at5,056 MiB/ 79 pools (@SlopTart), RX 9070 XT 16 GB Linux/RADV 25 min crash-free (@DavidM1911).Regression run
main:
PR (v1
889008fd— rerun pending foraf3ebe93):Not tested
cargo test --workspace -- --test-threads=4, including the newcapped_eager_placed_texture_recovers_on_upload_after_capacity_freesandcapped_lazy_level_texture_retries_same_bytes_after_capacity_freesGPU readback tests) and a fresh 60 sscripts/smoke.ps1retail pair onaf3ebe93(authored on Linux without a Windows GPU host).vkd3d-protonon NVIDIA (lockhart/ 8 GB cap) onaf3ebe93to confirm explicitD3D12_TILE_RANGE_FLAG_NULLbinding +#2275multi-queue retirement resolve theXid 31copy-engine fault reported on889008fd+68a284a.Pagesallocations (sparse heaps, coherent window, PSOs) consume ~5 GB, the default 75% adapter cap (~8.3 GiB) prevents unbounded growth (#646) whileXCL_TARGET_PAGES_MB=4096(ortitle_memory_mb = 4096) boundsPagesmore tightly;XCL_TARGET_PAGES_MB=0restores uncapped behavior.AI use
vram.rsandtitle_textures.rsbudget,FLAG_NULLsparse init, per-slice atomic packed groups, pending + retiring pool-cap accounting, active eager + lazy-level recovery, unit/GPU tests, and adversarial review fixes.pending_poolslock-handoff catch and test contributed by@thehollowedoneusing Codex (GPT-6.2 Sol / Astra); Windows v1 GPU test and smoke runs reported by@Haxodiususing Claude Code (Claude Opus 5.5).