Skip to content

D3D12.X: XCL_TEXTURE_SYSMEM puts streamed texture levels in system memory - #3039

Open
treybertram06 wants to merge 2 commits into
xcl-dev:nvidia-devfrom
treybertram06:nv-texture-levels-sysmem
Open

treybertram06 wants to merge 2 commits into
xcl-dev:nvidia-devfrom
treybertram06:nv-texture-levels-sysmem

Conversation

@treybertram06

Copy link
Copy Markdown
Contributor

Target: nvidia-dev. Stacked on #2987; only the top commit belongs here. Part of #2688. Related: #1702.

With XCL_TEXTURE_LEVEL_PAGES=1, a streamed texture's levels get video memory pages as their texels arrive. On a 10 GB card a retail world holds 1.5–2 GB of them, beside about 3 GB of render targets and the title's other GPU memory, past the budget Windows gives the process, which then pages whatever it likes.

XCL_TEXTURE_SYSMEM=1 (off by default; only with level pages) gives those levels pages from pool heaps in system memory (custom heaps, MEMORY_POOL_L0, write-back), which the GPU samples over PCIe. Render targets and every other texture keep video memory, since they're written every frame. #1702 moves all texture page pools instead, render targets included.

What is in it

  • D3D12.X: XCL_TEXTURE_SYSMEM puts streamed texture levels in system memory (hle/d3d12x/vram.rs):
    • bind_range_in takes new pages from the system-memory pools for lazy levels;
    • a page of those heaps has SYS_TILE in its heap index, and freed ones cool in their own pool (cool);
    • map resolves either heap.
  • New test a_system_memory_page_is_told_apart_and_cools_in_its_own_pool.

Tested

Regression run
Base, a commit of main: b49be183, the last main commit before #2555's launch preparation gate. The switch is off in both runs.

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3080
title: 4ba6c38e
seconds: 60
exit: 0x0
frames shown: 1415 (PresentX 1415)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 15557 MB

This PR's head:

xcl-smoke v1
commit: 7cce7d3d4625ac8f90f146f1f89f25a613e32e76
gpu: NVIDIA GeForce RTX 3080
title: 4ba6c38e
seconds: 60
exit: 0x0
frames shown: 1631 (PresentX 1631)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 17670 MB

Not tested

  • AMD and Intel GPUs.
  • Other titles.
  • Sessions longer than 610 s on this head (900 s with the prototype).
  • The system-memory pool heaps are never given back (the video-memory ones are, reclaim_empty_heaps).
  • No GPU fixture that samples a level from a system-memory page.

AI use

  • Claude Code with Claude Opus 5.5. It measured the placement, wrote the code, the test and this description, and ran the tests and title runs. The author reviewed the diff.

treybertram06 and others added 2 commits November 27, 2026 07:52
With XCL_COHERENT_HEAPS=sparse the title's GPU heaps (committed memory with
a PAGE_GRAPHICS_* protection, ~4.5 GB in a retail title) live in the sparse
windows. Those are the data the title's shaders read and write every frame;
in the coherent window (system memory, read over PCIe) one retail compute
program took 1,364 ms a frame on an RTX 3080, under 33 ms in video memory.
With them in video memory the windows hold ~7.5 GB of tiles and the device
ran out of its budget (19 GB in use against 8.9 GB, removed at 659 s).

XCL_SPARSE_SYSMEM=1 (off by default): kernelx registers a GPU heap's range
as hot before its commit maps its tiles (sparse::alloc_as); every other
sparse-window tile takes a pool tile in system-memory pool heaps (custom
heaps, L0, write-back), which the GPU reads over PCIe. A pool tile of those
heaps has SYS in its pool index; freed ones cool in their own lists.

RTX 3080, retail title, 400 s of its world after the menus: heaps in video
memory alone 0.98 presents/s and 19 GB of video memory; with this and the
texture-level counterpart 1.70 presents/s, 12.7 GB, no device removal in
900 s. An RTX 4080 report on xcl-dev#2688 found the same with a port of it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mory

With XCL_TEXTURE_LEVEL_PAGES=1 a streamed texture's levels get video memory
pages as their texels arrive. On a 10 GB card a retail world holds 1.5-2 GB
of them beside 3 GB of render targets and the title's GPU heaps, past the
budget Windows gives the process, which then pages whatever it likes.

XCL_TEXTURE_SYSMEM=1 (off by default, with level pages): those levels take
their pages from pool heaps in system memory (custom heaps, L0, write-back),
which the GPU samples over PCIe. Render targets and every other texture keep
video memory: they are written every frame (xcl-dev#1702 moves all pages instead).
A page of those heaps has SYS_TILE in its heap index; freed ones cool in
their own pool.

RTX 3080 10 GB, retail title, XCL_COHERENT_HEAPS=sparse with
XCL_SPARSE_SYSMEM=1 (xcl-dev#2987), 610 s: video memory at the end 15.1 -> 11.9 GB
local, presents in the 400 s after the menus 0.72 -> 1.35 a second (one run
each). Without the sparse part it is slower (0.15): the heaps the GPU reads
over PCIe share the bus with the levels.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thehollowedone

Copy link
Copy Markdown
Contributor

Independent RTX 3080 Ti check on #3039 head 7cce7d3d.

The PR already notes that empty system-memory pool heaps are retained. I reproduced that in a focused D3D12 test: with one tile live, a fully free 64 MiB L0 heap was not reclaimed after a sweep. After the final tile cooled, another empty L0 heap was still retained. The regression failed on the untouched head and passed with the candidate below. The change reclaims empty sys_pool slots, takes their handles from sys_pools, and sends them through the existing queue-fence retirement batch. The local VRAM heap with the same numeric slot remains live.

Tested: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti 12 GB / driver 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11. With XCL_TEXTURE_LEVEL_PAGES=1 and XCL_TEXTURE_SYSMEM=1, cargo build --workspace passed on the candidate. cargo test --workspace --no-fail-fast -- --test-threads=4 on the untouched head: 1,823 passed, 13 failed, 48 ignored, 26 GPU SKIPPED notices. On the isolated candidate build after cargo build --workspace: 1,824 passed, the same 13 failed, 48 ignored, 26 GPU skip notices. The failure names match exactly; the extra pass is the new reclaim regression. The existing 11-mip synthetic texture GPU fixture passed, including byte-exact copy readback. A temporary assertion confirmed its mapped tiles carried SYS_TILE, rather than silently falling back to VRAM; that assertion is omitted from the diff because the fixture also runs with the switch off.

Source-review note: the statement that render targets keep VRAM has an alias exception. If a streamed level first maps a page in L0, a later render target at the same title page reuses that tile; the reverse order retains VRAM. This preserves page aliasing. I would qualify the description as “new pages use the selected pool; aliases keep their first backing,” and test both placement orders before promising strict render-target VRAM placement. I did not measure an in-game performance effect of this case.

The candidate is local and uncommitted. A real title smoke pair, AMD/Intel coverage, and shader sampling from an L0-backed level remain to be checked on a clean author commit. AI use: Codex (GPT-6.2 Sol) wrote and ran the regression/candidate and this report; Codex (GPT-6.2 Astra) independently reviewed the alias and fence-lifetime paths.

Candidate diff: reclaim cooled system-memory heaps and cover the pool boundary
diff --git a/crates/xcl/src/hle/d3d12x/vram.rs b/crates/xcl/src/hle/d3d12x/vram.rs
index 2e6566b5..17dcf103 100644
--- a/crates/xcl/src/hle/d3d12x/vram.rs
+++ b/crates/xcl/src/hle/d3d12x/vram.rs
@@ -753,6 +753,20 @@ impl Pages {
                 self.pools.len()
             );
         }
+        let sys_ids = self.sys_pool.reclaim_empty_heaps(keep_spare_pools(), POOL_PAGES);
+        let sys_count = sys_ids.len();
+        for idx in sys_ids {
+            if let Some(h) = self.sys_pools.take_heap(idx) {
+                dropped.push(h);
+            }
+        }
+        if sys_count > 0 {
+            let mb = (sys_count * POOL_PAGES as usize * PAGE) >> 20;
+            crate::xlog_info!(
+                "D3D12.X: reclaimed {sys_count} empty 64 MiB system-memory pool heap(s) ({mb} MiB; {} pools active)",
+                self.sys_pools.len()
+            );
+        }
         dropped
     }
 
@@ -1763,6 +1777,59 @@ mod tests {
         assert_eq!((pool.free_total, sys_pool.free_total), (free + 1, sys_free + 1), "each back in its own pool");
     }
 
+    #[test]
+    fn cooled_system_memory_pool_heaps_are_reclaimed_independently() {
+        let _guard = VRAM_TEST_LOCK.lock().unwrap_or_else(|e| e.into_inner());
+        use windows::Win32::Graphics::Direct3D::D3D_FEATURE_LEVEL_11_0;
+        use windows::Win32::Graphics::Dxgi::*;
+        unsafe {
+            let factory: IDXGIFactory4 = CreateDXGIFactory1().expect("DXGI factory");
+            let Ok(adapter) = factory.EnumAdapters1(0) else {
+                return crate::gpu::recomp::runner::skip_test("no adapter");
+            };
+            if adapter.GetDesc1().is_ok_and(|d| d.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0) {
+                return crate::gpu::recomp::runner::skip_test("software adapter");
+            }
+            let mut device: Option<ID3D12Device> = None;
+            let _ = D3D12CreateDevice(&adapter, D3D_FEATURE_LEVEL_11_0, &mut device);
+            let Some(device) = device else {
+                return crate::gpu::recomp::runner::skip_test("no D3D12 device");
+            };
+            let Some(mut pages) = Pages::new(&device) else {
+                return crate::gpu::recomp::runner::skip_test("tiled resources tier < 2");
+            };
+            let spare = keep_spare_pools();
+            if spare > 4 {
+                return crate::gpu::recomp::runner::skip_test("test's 64 MiB heap budget exceeded by keep-spare setting");
+            }
+            let Some(local) = alloc_pool_heap(&device) else {
+                return crate::gpu::recomp::runner::skip_test("cannot allocate local pool heap");
+            };
+            let local_slot = pages.pools.push_heap(local);
+            pages.pool.add_heap_at(local_slot, POOL_PAGES);
+            let t0 = Instant::now();
+            let local_tile = pages.pool.take_batch(1, None, t0, POOL_PAGES, || None).unwrap()[0];
+            for _ in 0..spare + 2 {
+                let Some(heap) = alloc_sys_pool_heap(&device) else {
+                    return crate::gpu::recomp::runner::skip_test("cannot allocate system pool heap");
+                };
+                let slot = pages.sys_pools.push_heap(heap);
+                pages.sys_pool.add_heap_at(slot, POOL_PAGES);
+            }
+            let sys_tile = pages.sys_pool.take_batch(1, None, t0, POOL_PAGES, || None).unwrap()[0];
+            let first = pages.sweep_and_reclaim(t0);
+            assert_eq!(first.len(), 1, "one fully free system heap retires while another has a live tile");
+            assert_eq!(pages.sys_pools.len(), spare + 1);
+            assert_eq!(pages.pools.len(), 1, "the same-index local heap stays live");
+            pages.sys_pool.push_cooling(sys_tile, t0);
+            let second = pages.sweep_and_reclaim(t0 + COOL + Duration::from_millis(1));
+            assert_eq!(second.len(), 1, "another empty heap retires after the last tile cools");
+            assert_eq!(pages.sys_pools.len(), spare);
+            assert_eq!(pages.pools.len(), 1);
+            assert!(pages.pool.live[local_tile.0 as usize]);
+        }
+    }
+
     /// The levels of a texture with lazy levels: a group of tiles for each level with tiles of its
     /// own and one for the packed levels; a level past the last standard one is in the packed
     /// group; a tiling that does not add up to the resource's tiles gives none.

@andrewDoing

Copy link
Copy Markdown

I checked shader reads from the system-memory level pages on RTX 5070 / NVIDIA 616.92 at head 7cce7d3d4625ac8f90f146f1f89f25a613e32e76. A test-only extension of the existing native level-pages fixture used a 1024×1024 RGBA8 texture with 11 mip levels and explicit 2D views. Both cases enabled XCL_TEXTURE_LEVEL_PAGES=1; the same binary ran in fresh processes with XCL_TEXTURE_SYSMEM=1 and 0 (in that order).

  • System-memory case: all 86 referenced tiles carried SYS_TILE, and their native heap descriptions reported D3D12_MEMORY_POOL_L0.
  • Local control: all 86 referenced tiles used XCL's local pool, with no system-memory tags.
  • In both cases, SampleLevel(1) returned the expected value 48 for all 2,048 pixels of its half, and Load from mip 0 returned 25 for all 2,048 pixels of the other half. Both focused runs passed without skips.

This establishes shader-visible contents in this synthetic fixture and verifies the backing heap descriptions. It does not measure physical residency, PCIe traffic, frame time, or retail memory savings.

AI use: OpenAI Codex with GPT-6.2 Astra built and ran the checks; Codex reviewed and prepared this report.

@Anon64

Anon64 commented Nov 27, 2026

Copy link
Copy Markdown

RTX 3060 12 GB (NVIDIA), this PR's head 7cce7d3d, retail title, 300 s: with XCL_TEXTURE_SYSMEM=1, peak local video memory falls from 12 967 MB to 10 362 MB, so it fits on the card. It's the only run on this card so far that stays under 12 GB.

Same build, both runs with XCL_TEXTURE_LEVEL_PAGES=1, release, XCL_ACTIVITY=1, A pressed every 4 s from 20 s, warm caches, one run each.

XCL_TEXTURE_SYSMEM off XCL_TEXTURE_SYSMEM=1
end exit 0x0 exit 0x0
frames 1 783 1 738
last present ~137 s ~214 s
peak commit 36 592 MB 39 487 MB
peak local video memory 12 967 MB 10 362 MB
peak non-local 5 720 MB 8 370 MB

About 2.6 GB moves from local to non-local, and process commit goes up by about 2.9 GB. Frame counts are about the same. In neither run does presenting go past world load. In earlier runs on this card that stop came from title-thread driver compiles (#2595), so the later last present with the switch on may not be due to the switch. Neither run had device removals or crashes.

For comparison, the nvidia-dev tip e0821b12 without level pages peaked at 16 840 MB local on this card.

RTX 3060 12 GB (driver 581.80), i9-14900KF, 64 GB RAM, Windows 11 26200.

AI use: Claude Code (Claude Opus 5.5) built the PR, ran the title and wrote this report.

@DarkPanda69

Copy link
Copy Markdown

AMD run for the Not tested line (also covers #2987, whose three new tests are part of this diff).

Tested: pass, head 7cce7d3 applied on its base nvidia-dev d1be810, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X.
cargo test -p xcl --lib -- hle::d3d12x::sparse hle::d3d12x::vram hle::kernelx --test-threads=4 --nocapture:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010: 153 passed, 0 failed, 3 ignored, 0 SKIPPED (nvidia-dev alone: 149 passed). New and ok: a_lazy_tile_outside_the_gpu_heaps_gets_system_memory, a_parked_system_memory_tile_gives_way_to_a_gpu_heap, the_title_gpu_heaps_are_hot_and_nothing_around_them, a_system_memory_page_is_told_apart_and_cools_in_its_own_pool.

#2987 at f8e75bc alone, same base, hle::d3d12x::sparse hle::kernelx: 130 passed, 0 failed (127 without), its three new tests ok.

The sparse and vram tests make their device on the first adapter (D3D12CreateDevice(None, ..)), the RX 9070 XT here.

Not tested: a title run or a session longer than a test, the system-memory pool heaps being given back, Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

@andrewDoing

Copy link
Copy Markdown

I checked the creation-order overlap question on RTX 5070 / NVIDIA 616.92 at head 7cce7d3d4625ac8f90f146f1f89f25a613e32e76. A test-only native fixture used CreatePlacedResourceX to place a 1024×1024 RGBA8 sampled texture (11 mips) and a one-mip render target at the same guest start, in both orders. Four fresh processes covered both orders with XCL_TEXTURE_SYSMEM=1 and 0; level pages were enabled throughout.

Setting and creation order First resource backing Newer resource backing
System memory on, sampled then RT Sampled: 86 L0 tiles RT: 64 L0 tiles
System memory on, RT then sampled RT: 64 local tiles Sampled: 64 local + 22 L0 tiles
System memory off, sampled then RT Sampled: 86 local tiles RT: 64 local tiles
System memory off, RT then sampled RT: 64 local tiles Sampled: 86 local tiles

After the newer placement, the superseded resource had zero tracked tiles in each case. While the RT was active, a native clear and copy readback matched all 1,048,576 pixels, including when its 64 tiles were L0-backed. Sampled mip-1 copy readback also matched in every case. All four focused runs passed without skips.

This confirms that an RT can inherit L0 backing when it replaces a streamed texture, despite the intended placement distinction; the reverse order can leave sampled tiles local. It does not establish OS physical residency, simultaneous-alias correctness, retail frequency, or frame-time impact.

AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixture; Codex reviewed and prepared this report.

@thehollowedone

thehollowedone commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

merge-check
base: d1be8103644791b7a65f068954324e93d4b1b565 (nvidia-dev)
head: 7cce7d3d4625ac8f90f146f1f89f25a613e32e76
merge: clean trial merge of the #2987 + #3039 stack into the current nvidia-dev tip; #2987 is an ancestor and #3039's own commit changes only vram.rs (+123/-12). The combined merge changes three intended files (+362/-22).
build: cargo build --locked --workspace -> ok.
tests: cargo test --locked --workspace --no-fail-fast -- --test-threads=4 -> first run 1,827 passed, 9 failed, 48 ignored, 27 GPU SKIPPED notices; repeat 1,828 passed, 8 failed, 48 ignored, 27 skips. All four tests added by the stack passed. Eight failures in the repeat are a subset of the nine on the untouched exact base: both texture-upload tests, the console-MS test, the async-compute PSO test, split-compute in two targets, and two-pass driver-cache in two targets. The first run also failed memory_under_a_shown_page_is_told_to_sparse_before_it_goes; it passed alone (1/0), in the kernelx group (59/0, 1 ignored), and in the full-suite repeat. Its cause is unresolved, so I am not attributing that one result to this PR.
review: Fully unused L0 texture pool heaps remain allocated after cooling. sweep_and_reclaim drains sys_pool.cooling but reclaims only pool/pools, leaving every sys_pools heap at the streaming high-water mark. My earlier exact-head RTX 3080 Ti regression and collapsed candidate diff show an unused 64 MiB L0 heap retained above the configured spare, then passing after the cooled system pools join the existing fence-aware retirement path. That test also keeps the same-index local heap live. This is avoidable system-memory commitment, not evidence that it caused a device removal. #2987 has a separate system-memory pool that needs its own follow-up.
review: a render target placed over an already mapped streamed page inherits its L0 backing, as the creation-order GPU check confirms. This preserves title-page aliasing; please qualify the description's blanket statement that render targets keep video memory. Do not split one aliased page into two backings to make that statement true.
performance: the new switch is off by default. With it on, system-memory sampling trades local VRAM pressure for non-local access and process commit. An independent RTX 3060 run reports lower local VRAM and higher commit, but I did not measure retail frame time or memory on this trial merge.
verdict: not yet: reclaim cooled, fully free L0 texture pool heaps through the existing deferred retirement path, then rerun the focused regression. The prior linked diff is a small candidate for this top commit; the parent pool should be handled separately.
hardware / tool and model: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (NVIDIA 621.35), rustc 1.99.1 MSVC, SDK DXC 1.8.2502.11. Codex (GPT-6.2 Sol) ran the trial merge, build, two full suites and focused kernelx reruns, reviewed the merged diff, and wrote this check; Codex (GPT-6.2 Astra) independently traced allocator and heap-retirement lifetimes.

Not tested here: a new retail-title run, AMD, Intel, or a production change on this trial merge.

@throny

throny commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

merge-check claim
head: 7cce7d3

@throny

throny commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

merge-check
base: d1be810 (nvidia-dev)
head: 7cce7d3
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1827 passed, 9 failed, 48 ignored (27 SKIPPED lines). Eight are the base's own failures on this GPU (the same six names with and without the PR; base alone: 1824 passed, 8 failed, 48 ignored). The ninth, hle::d3d12x::vram::tests::gpu_retire_queue_holds_heap_until_blocked_queue_passes_mark, failed once in the full run with an out-of-memory result (0x8007000E) from a create call in the test; rerun on the same merge result it passed 6 of 6 alone and 2 of 2 with the whole vram module, and 6 of 6 on the base. I read it as memory pressure from GPU tests running side by side, possibly a little higher with this PR's own tests, not as a defect of the change.
review: opt-in confirmed: it needs both XCL_TEXTURE_LEVEL_PAGES=1 and XCL_TEXTURE_SYSMEM=1. Open points, none blocking for an opt-in: system-memory heaps are never reclaimed (the sweep reclaims only the video-memory pool); a render target placed after a sampled texture on the same pages keeps that texture's system-memory pages (raised in the thread, still on this head); with the sparse switch on, pool_bytes counts system-memory tiles in quarantine as free video memory; the suite has no GPU test of sampling from the vram.rs path (corrected after a note in the thread: a tester did exercise it on this exact head with a synthetic fixture, all sampled pixels matching the control; it is not a title or performance result). The diff here includes #2987 (XCL_SPARSE_SYSMEM). For whoever merges: it conflicts with #2898 in sparse.rs in text and in meaning (its system-memory tiles must not go into #2898's per-heap free table, which would be resized to a huge index): merge #2898 first and rebase this on it.
performance: with the switch off, nothing measurable (a OnceLock read and an empty-queue drain per sweep; note_hot always records the title's GPU heaps in a small Vec). With it on, sampled levels are read from system memory across the bus and commit rises (a tester measured about +2.9 GB), which matters on machines without a page file. Not measured here.
verdict: safe to merge (as opt-in, after a rebase on #2898)
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build, suite and reruns by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

@andrewDoing

Copy link
Copy Markdown

@throny One coverage correction for the merge check: the earlier RTX 5070 test did exercise native shader sampling from the vram.rs level-page path on exact head 7cce7d3d. It verified all 86 texture tiles as SYS_TILE on L0 heaps and compared SampleLevel(1) and mip-0 Load output with the local-pool control; all 2,048 pixels in each output half matched.

That is a synthetic explicit-2D-view fixture, not a retail sampling or performance result, and it does not resolve the heap-reclamation, alias-placement, or #2898 integration concerns.

@razormontana

Copy link
Copy Markdown
Contributor

Independent native validation of 7cce7d3d4625ac8f90f146f1f89f25a613e32e76 with #2987 f8e75bca1ea903b1cf0e9d4f9387b73f359e5051 on d1be8103. Windows 11 Pro build 22631, Core i7-10700K, RTX 3070 8 GB with NVIDIA 617.42, Rust 1.100.0 x64 MSVC.

Tested

  • cargo test --offline --locked -j 1 -p xcl --lib --no-run --message-format=json-render-diagnostics succeeded. Three selected CPU and three native GPU cases passed on the exact clean stack. This includes the stock a_placed_texture_gets_the_pages_of_a_level_with_its_texels fixture with level pages and texture sysmem enabled. The library test executable used exact names with --exact --nocapture --test-threads=1.
  • Two fresh test-only runs added tag and D3D12 heap descriptor assertions to that fixture. With XCL_TEXTURE_LEVEL_PAGES=1 in both, the same 86 mapped tiles used one default heap with texture sysmem off and one custom L0 write-back heap with it on. The 1024×1024 texture's 11 mips read back byte-for-byte in both runs. The overlay changed only test code.
  • 6 exact-head passes plus 2 test-only passes, 0 failed, 0 ignored, 0 explicit skips.

Not tested

These focused checks leave shader sampling, mixed render-target placement order, whole L0 heap reclamation, and retail VRAM savings open.

AI use

Codex GPT-6.2 ran the focused validation, checked the results, and prepared this report.

@Prime1997

Copy link
Copy Markdown
Collaborator

I reused the texture-level part of this proposal for the NVIDIA candidate, preserving attribution rather than opening another PR. The adaptation is a4e83a1eb411e4d3e6cf6e8f202f1f2c42a1d16a: optional L0 texture backing, symmetric empty-heap reclamation for the system pool, and pool accounting that includes both local and system capacity. It follows the fail-closed retirement adaptation from #2538. Existing shared pages retain their backing; allocation failure falls back locally. The sparse/kernel changes in your stacked #2987 are not included. Global defaults remain off; the isolated 8 GB launch explicitly enables the switch as a memory-placement experiment, not a total-memory reduction or guaranteed budget cap.

The combined candidate a4e83a1eb411e4d3e6cf6e8f202f1f2c42a1d16a compiled successfully with cargo build --locked --release -p xcl --target-dir <isolated target> on Windows x64 (230 seconds). This is combined-tree compilation, not an individual-PR build or GPU validation. Source review completed; regression fixtures are present but were not run after the user explicitly waived further shader/memory checks and requested an interactive launch. Hardware behavior, paired title regression and actual sustained memory savings remain unvalidated. No merge-readiness claim.

Codex (GPT-6) prepared this scoped adaptation and report. Optional temporary contributor/testing coordination: https://discord.gg/gK3y7WRRY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants