Repository navigation
Conversation
A sampled texture of at most 4 KiB inside one 64 KiB page of the title's address (no page boundary within it) got an extra 64 KiB tile on the title-texture pages, keyed by its address. A retail game makes ~12 000 views of 16x4 textures of 1-2.5 KB while it loads its world: 768 MiB of tiles for 20 MiB. Such a texture is now a 4 KiB-aligned placed resource in 4 MiB heaps (when the PC places it with 4 KiB alignment), one slot per address: textures at one address share it as they shared the tile, and it stays a placed texture for title_textures. A slot no texture uses any more is reused after COOL. Assisted-by: Claude Code (Claude Opus 5.5)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
First native Windows / AMD run of Setup: AMD Radeon RX 9070 XT 16 GB (RDNA4), driver 32.0.32015.2008, Ryzen 7 9800X3D, 31 GB RAM, Windows 11 26200.9974, rustc 1.100.0 MSVC, release. Retail title 1.0.2.1, the same saved state for every run. Memory (does what it says): 240 s runs into the world load, two each.
That's about 0.7 GB less in both columns. The world load stalls the same way in all four runs: presents fall to 0 at 110–120 s, memory goes flat, then the title's own stop (#534). So the saving doesn't change how far the load gets here. Regression: fewer frames after the first A press. Second round:
Tests on this card: TESTS_PLACEHOLDER Not tested
AI use
|
…all#1248, ivall#1250, ivall#1265, ivall#1273, ivall#1277, ivall#1278 Fix sudden RAM OOM during world loading under XCL_PSO_WAIT_MS and integrate 6 new upstream PRs: - pso_async.rs: track active waiters via WantGuard so build_is_wanted() drops back to false once resolve_within times out, preventing all background workers from bypassing BIG_COMPILES and commit-memory guards simultaneously (adds unit test a_timed_out_bind_clears_wanted_demand). - ivall#1248: pack <= 4 KiB sampled textures into 4 KiB heap slots instead of 64 KiB tiles (~768 MiB VRAM saved). - ivall#1250: late_release seals/waits only when nothing is in flight. - ivall#1265: default SRVs of multisampled depth buffers use Texture2DMS/Texture2DMSArray. - ivall#1273: skip budgeted bind waits when all workers are busy / build is queued behind others. - ivall#1277: exit sparse::upload_dirty cleanly if staging ring fence wait times out. - ivall#1278: isolate >= 4 MiB DXIL compute driver compiles in a dedicated GIANT_COMPILES queue. Assisted-by: Antigravity (Google DeepMind)
|
RDNA3 data point on Windows, RX 7900 XT, driver 32.0.32029.2010. I applied 7877001 to main 930e8b4 and ran the exact hardware test hle::d3d12x::vram::tests::small_sampled_textures_take_slots_not_pages. It passed in 0.26 s with no skip reported, including the 64 distinct addresses, reuse at the same address, and page-boundary fallback. This confirms 4 KiB placement support on this machine. I have no retail frame-time measurement for this PR on RDNA3 yet. |
|
Test report on the retail title, on a 10 GB card. #1182 and #1248 were tested together, in one build. The savings below are for both combined, not split between them. Builds
Setup: RTX 3080 10 GB (driver 610.88), Ryzen 5 7600X, 32 GB RAM, Windows 11 26200. Settings: Tested From the
Not tested
Test report written with Claude Code (Claude Opus 5.5) from my own runs; the extra logging is local only. |
|
Linux (Wine + vkd3d-proton) + NVIDIA test of Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, Tested
The readings are those of the The failed DirectStorage requests are the ones #549 is about. Their count swings between runs of one tree, on both sides, so I do not put the two high first runs with the change down to it. Read
Not tested: past the stall, where the description's 300 s numbers are; a card with free video memory at that point; the preload of #690 on; the rest of the test suite; AMD and Intel. AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the tests and the ten runs, compared the logs and wrote this report. Edited 2026-11-24: removed a paragraph that said three runs without the change logged NVIDIA kernel messages and the runs with it did not. Every run logs the same 12 lines ( |
|
Measured together with #1182 on a 12 GB RDNA2 card and the retail title (head AI use: Claude Code, Claude Opus 5.5 ran the runs and wrote this note. |
|
Tested commit Tested
Regression run ( Base ( PR ( Not tested
AI use
|
# Conflicts: # crates/xcl/src/hle/d3d12x/vram.rs
A sampled texture of at most 4 KiB that sits inside one 64 KiB page of the title's address (no page boundary within it) gets a whole 64 KiB "extra" tile on the title-texture pages (
vram::Pages, keyed by its address). While a retail game loads its world it makes ~12 000 views by address of 16x4 R16G16B16A16_FLOAT textures of 1–2.5 KB each: 768 MiB of tiles for 20 MiB of textures (counted with a local log line, not in this PR). Part of #320.What is in it
vram.rs:place_pagesfirst triesplace_small. A texture of ≤ 4 KiB on the console, single-sample, with no page boundary inside it, that the PC places in 4 KiB (GetResourceAllocationInfowithAlignment = 4096says so) becomes a placed resource in 4 MiB heaps (DENY_BUFFERS | DENY_RT_DS_TEXTURES), one 4 KiB slot per title address. Anything else takes the pages as before.PLACED_TEXTURES, sotitle_texturestreats them as before. A slot no texture uses any more is reused afterCOOL(2 s).XCL_ACTIVITY"target pages N MB (pools M MB)" figure includes the small slots and heaps.small_texture_slots_are_per_address_and_come_back_cooled(no GPU) andsmall_sampled_textures_take_slots_not_pages(GPU: 64 such textures take slots and no pages, a second one at an address shares its slot, two neighbours keep their own texels after a copy in and a read back, one over a page boundary still goes on the pages, released slots come back). It fails withplace_smalltaken out ("small textures took pages").Tested
x86_64-pc-windows-msvc(rustc 1.100.0) and run under GE-Proton11-12's Wine with a vkd3d-proton v3.1 build carrying Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257's patch, DXVK's dxgi, DXC 1.9.2609. NVIDIA GeForce RTX 2060 SUPER 8 GB (driver 620.70; main's full-suite run below was on 615.71), Ryzen 5 3600, 16 GB RAM.cargo test -p xcl --lib vram:: title_textures::: 24 passed, 0 failed on 620.70 (includesplaced_title_textures_share_vram_and_preserve_pixels).cargo test --workspace -- --test-threads=4(debug), this branch (same tree as 7877001, driver 620.70): lib 643 passed, 57 failed, 21 ignored; e2e 2/1 failed; pls_quota 0/1; predication_e2e 0/1; the rest passed.main(47efa2e), same setup on driver 615.71: lib 642 passed, 56 failed. Same failures apart from the new GPU test, which fails there only on a poisonedVRAM_TEST_LOCK, asd32s8_targets_take_their_own_size_of_video_memorydoes on main. Most failures followgpu_more_atomics_sub_dword_scratch_valu, which hangs the GPU on this stack and leaves the shared device removed.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),gpu_console_textures_upload_every_mip_and_slice,gpu_upload_batches_reuse_the_queues_upload_buffer(no GPU).XCL_PRESS_AT) into its world load,XCL_ACTIVITY=1. Title-texture pages / non-local video memory at the end: main 6963 / 7521 MB (300 s), this PR 4876 / 5381 MB (299 s). Local video memory is full (~7.6 GB) in both, so what the pages save is what spills into system memory. At ~240 s: main 4754 / 5204, PR 4055 / 4609 MB. The runs reach the world load at different times, so single runs vary: another run of the same tree ended at 5645 / 6211 MB. Earlier pairs on 615.71: 6025 → 4424 MB of pages (47efa2e), 5646 → 4500 MB (beaa245).Regression run
Made by a line-for-line bash port of
scripts/smoke.ps1(no PowerShell here), A pressed from 100 s in both runs.peak commitis 0 because Wine reports no private bytes. Not every run here gets to 300 s: on this commit 3 of 4 runs ended with status 0x3 from an abort inside winevulkan / d3d12core (no xcl.exe frame on the stack), the same abort as in earlier runs of main (cedf8ce); on main 47efa2e one of three runs was killed at the 13 GB memory cap and one crashed in ucrtbase (read in a GPU view of CPU memory).main:
PR:
Not tested
AI use