Repository navigation
Conversation
towiice
left a comment
There was a problem hiding this comment.
Tested:
- Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, wave32, driver 610.88), Windows 11 x64 (26H2 / build 26300), DXC v1.9.2609 (
01b62ad4), toolchainstable-x86_64-pc-windows-gnullvm(llvm-mingw 23.1.6), debug build. cargo test -p xcl --lib hle::d3d12x::vram -- --test-threads=1: 9 passed, 0 failed.cargo test -p xcl --lib hle::d3d12x::title_textures -- --test-threads=1: 14 passed, 0 failed (3.50 s), including the newrender_targets_on_one_physical_page_share_its_video_memoryandplaced_title_textures_share_vram_and_preserve_pixels.
Verified cleanly on 4 GB VRAM Turing hardware with zero regressions.
Not tested: full workspace suite, release builds, retail titles (smoke.ps1).
|
Independent verification on current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
Ran the new test and the Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
Not tested: retail titles, RDNA2/RDNA4 and Intel GPUs, Wine, release profile. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified. |
|
Test report for head Tested
Not tested: retail titles (no smoke run), RDNA3/RDNA4. AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output. |
|
A regression run under Wine on Linux, on a retail title. Tested
Regression run main (first run): this PR: The last Not tested
AI use
|
…vall#1142, ivall#1150, ivall#1156, ivall#1182, ivall#1191, ivall#1195, ivall#1221 Integrate 10 high-impact open upstream PRs on top of upstream/main (930e8b4): - ivall#1182: share video memory across render targets aliased onto one physical page (~1.85-2.1 GB VRAM saved) - ivall#1142: declare tiled texture pools texture-only (D3D12_HEAP_FLAG_DENY_BUFFERS) for vkd3d-proton - ivall#1097: report process memory under Wine via PagefileUsage fallback - ivall#1078: bound BCPack record scratch memory to 2 KiB stack batches - ivall#1150: convert console clear-value formats in CreatePlacedResource - ivall#1156: release the interface returned by QueryInterface in class_for - ivall#1139: check pointer alignment in is_adopted before dereferencing - ivall#1195: skip ExecuteIndirect dispatch of untranslated console compute pipelines - ivall#1191: VirtualProtect commits lazy pages in its range first - ivall#1221: unmark lazy away mappings in FreeTitlePhysicalPages Assisted-by: Antigravity (Google DeepMind)
…ps (ivall#594) Re-apply XCL_PAGE_BUDGET_MB LRU texture eviction (ivall#640) and fenced unmaps (ivall#594) on top of upstream/main (930e8b4) + ivall#1182/ivall#1142/ivall#800, using real::create_raw_fence for vram queue fences under Wine. Assisted-by: Antigravity (Google DeepMind)
…ll#1221, and updated Linux PRs Update fork README for upstream/main 930e8b4 (BCPack BC1-BC7, XCL_PSO_WAIT_MS, low-VA ASLR < 2^40, alloc_pool, sparse tile parking/pool reuse, direct page moves, write-watch merge), newly integrated PRs (ivall#1078, ivall#1097, ivall#1139, ivall#1142, ivall#1150, ivall#1156, ivall#1182, ivall#1191, ivall#1195, ivall#1221), and updated Linux PRs (ivall#867, ivall#871, ivall#877). Assisted-by: Antigravity (Google DeepMind)
|
Confirmed on NVIDIA GeForce RTX 3060 12 GB (Windows 11 26200, driver
|
|
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. |
|
Retail title on a 12 GB RDNA2 card: local video memory stays under the card with this PR (and #1248) Setup: AMD Radeon RX 6700 XT 12 GB (RDNA2), driver 32.0.21045.29003, Ryzen 5 5600X, 16 GB RAM, Windows 10 Pro 22H2 (19045.6466), Agility SDK 1.620.2, Rust 1.90.0, release. Retail title 1.0.2.1, Two runs of the same tree,
Without them local video memory went past the card (13.6 GB at 650 s, the card has 12.2 GB) and that run ended at 658 s in Not tested: the two PRs apart; NVIDIA; whether anything renders differently (the title is still on its loading screen at that point here). AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my PC and wrote this report. Counts, times and sizes only. |
…ly pools (xcl-dev#1142) on TilePool
0cf6d08 to
efedeea
Compare
|
Tested commit Tested
Regression run ( Base ( PR ( Not tested
AI use
|
|
Empirical test report for PR #1182 on Intel Arc A770 (
PR-specific finding (Resource Heap Tier 1 / Intel Arc A770)The new test
Tested
Not tested
AI use
|
pvfreis
left a comment
There was a problem hiding this comment.
Review of efedeea merged onto main 656c0e8 (clean on 8f5fca5, same lines).
CONFIRMED (run): Pages::bind counts missing tiles by address, then takes them by page_key. vram.rs:568 looks up first + i * PAGE; :593 uses page_key(..), :601 fresh_iter.next().unwrap() (same lines at the head and merged). main uses the address in both (read). With a page mapped away the keys differ. It came with the rebase onto #1747: 0cf6d08 took tiles one at a time (take_tile), so the reports on 0cf6d08 don't cover it; the two posted 60 s smokes of efedeea show no crash.
- Physical key present, address key absent: the tile taken is lost. A second target on a physical page that already has a tile is this case too, so it is the PR's own case (read). 1100 placements of a one-page target at one mapped address, our test:
(pools, accounted): before (1024, 1023) after (2048, 947), 1 tile each. (1 was already lost before the loop, so the first assert fires; with the line below none is lost, before or after.) - Address key present, physical key absent: the process aborts. Two ways, in child processes; one:
let first = place(a, &rt); // reserved, no page mapped
map(); // MapTitlePhysicalPages: one page at `a`
let second = place(a, &rt); // abortsThe other: map(), a sampled texture at a, place(a, &rt). Both:
panicked at crates\xcl\src\hle\d3d12x\vram.rs:601:51:
called `Option::unwrap()` on a `None` value
panic in a function that cannot unwind
Exit 0xC0000409.
Our three tests pass with:
- self.pages.get(&(first + i * PAGE)).map(|p| p.tile.0)
+ self.pages.get(&page_key(first + i * PAGE, phys.get(i).copied().flatten())).map(|p| p.tile.0)cargo test --workspace --locked --offline --no-fail-fast -- --test-threads=4, debug, RTX 3060, one run each, passed / failed / ignored: main 1061 / 1 / 45; merged 1062 / 1 / 45; plus our tests 1062 / 4 / 47; plus the line 1065 / 1 / 47. The shared failure is the e2e title test. The PR's test passes in our three merged runs. Tests on request.
Not tested: a retail title (does it reach the abort?), AMD, our tests on main.
Review by Claude Code (Claude Opus 5.5), checked with Claude Fable 5.2; each point checked by a person before posting.
|
Test report for #1182 (tested at head Measured by an agent (omp, DeepSeek V4.1 Flash); I (Claude Code, Claude Sonnet 5.5) re-read the run logs, checked
Not tested
AI use: an agent (omp, DeepSeek V4.1 Flash) ran and measured; Claude Code, Claude Sonnet 5.5 verified and wrote this report. |
|
On
Test: in With that fix, one run each on a retail title at 154 s: target pages 5,681 → 3,832 MB, local video memory 10,288 → 8,534 MB. Tested: RTX 2070 SUPER (driver 617.14), Windows 11 26300, debug for the test, release for the title; ported onto a local tree with other changes, so not your branch as it is. Full suite there, before I added the check above: 1175 passed, 0 failed, 46 ignored. AI use: Claude Code (Claude Opus 5.5) found this, wrote and ran the test, and wrote this. |
|
I reproduced both tile-counting cases on efedeeac, following veyn-sudo’s review.
I tested a local correction that uses the same Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug. Synthetic placement and allocator coverage. GPU pixel readback, retail and the workspace suite are outside this report. AI use: OpenAI Codex (GPT-6) wrote the test changes and local correction, ran the comparison, and drafted this report. GPU pixel follow-up. I added Recheck on 5fa6950. On the same Windows and RTX 3080 Ti setup, |
# Conflicts: # crates/xcl/src/hle/d3d12x/vram.rs
|
I reproduced a second render-target alias case on an RTX 5060 Laptop GPU. If the first target uses the home address returned by
The cherry-pickable fix and tests are directly on this PR's head. They track explicitly mapped homes, preserve the existing owner when another page occupies the address, and clear the recorded identity on unmap or free. The GPU test uses fenced aliasing barriers in COMMON and reads both textures back. The separate spare-tile accounting change discussed above is independent. Bazzite 44.20261011.0, Intel Core 7 240H, RTX 5060 Laptop 8 GB, NVIDIA 615.78.08, Proton Experimental 11.0-20261112, vkd3d-proton 3.1.0 ( I also ran one offline Series X comparison per build with independent copies of the same prefix and shader caches. At frames 20, 116 and 212 the native present-source readbacks were black in both builds (0 of 518,400 sampled pixels above black per readback). The fixed build also sampled black at frames 308 and 404. All 15 control and 19 patched window captures were black. The external host-memory guard ended the runs at 6,068 and 5,994 MiB available, respectively. This pair did not verify a visible retail improvement. OpenAI Codex (GPT-6.2-Sol, high) wrote the patch and tests, ran them on this laptop, and prepared this report. |
xcl-dev#1182 keys owned pages by their physical page, but the count of tiles to take (from the xcl-dev#1985/xcl-dev#1663 batch code) still looked pages up by address: a page already shared through its physical page was counted as missing, and a new one not, so fresh_iter ran dry and the title aborted at vram.rs:789 in the first XCLM run (49 s, menus). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent native Windows GPU check of d3887f26. Windows 11 build 26300, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug. Tested
Combined follow-up Not tested AI use |
efedeea to
5fa6950
Compare
|
Thanks, everyone. Pushed
Full suite on AI use: Claude Code (Claude Opus 5.5) wrote the fix, the tests and this reply. |
|
Opened #2177 on top of your updated OpenAI Codex (GPT-6.2-Sol, high) prepared the stack and ran the checks. |
A retail game maps one physical page under render targets at two addresses at once (aliasing targets that are never live together, as the console allows). kernelx keeps a page at one address (`map_pages` moves it), and `vram::Pages` keyed its video memory by title address, so each alias got pages of its own: in its first 40 s the game placed 422 targets (2.1 GB) whose pages it then mapped under 276 others (1.85 GB), and kept using both sets (barriers, views). The duplicate cost 1.85 GB of video memory, and what the GPU wrote through one alias never showed in the other. A GPU-owned texture's owned pages are now keyed by the physical page mapped at their address (`kernelx::physical_pages`, asked before `PAGES` is taken), else by the address as before. Sampled textures keep address keys. Measured on GTA VI, RTX 2060 SUPER 8 GB, 90 s at the menus, 3 runs each: target pages 3597 -> 1738 MB, local video memory 6652 -> 4796 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5fa6950 to
de4d1f6
Compare
|
Both points of our review are fixed at Read by Claude Code (Claude Opus 5.5), checked with Claude Fable 5.2; each point checked by a person before posting. |
|
RTX 4060 Laptop / stock vkd3d-proton validation of the change and regression from This is a mixed local integration based on Environment: RTX 4060 Laptop 8 GiB, NVIDIA 590.48.01, i7-13620H, 16 GiB RAM; Linux 6.17.0-40-generic, Wine 11.0, stock/assert-enabled vkd3d-proton 3.2.0 ( Focused verification
Two unique tests, two passes, no test skips. The logs identify the actual NVIDIA adapter despite the configured DXGI vendor spoof. Release build passed. Bounded retail 1.0.2.1 runs Same local stack before/after this PR,
These end-of-run measurements are not matched gameplay phases. The later run visibly reached Navigation Experience, UI Text Size, Subtitles and Brightness setup. It reported 7,922 presents and 29.9 fps over the last 300, but these were menus, not gameplay. No unhandled title exception was recorded. Shutdown logged GPU fences still pending after 10 s; the guard subsequently timed out querying NVIDIA telemetry. Thus exit code 0 is not a clean-shutdown or stability claim. Offline XStore errors and command-list resubmission warnings also remained. Not tested: native Windows, AMD, clean PR head, full suite, home-address aliasing (#2177), world gameplay or 15-minute/30fps acceptance. Free disk stayed above 13.49 GiB. No proprietary assets or screenshots attached. AI assistance: omp / openai-codex/gpt-6-astra performed the integration, commands, measurements and report. Credit for the fix and regression remains with this PR's authors. |
crastinator
left a comment
There was a problem hiding this comment.
RDNA2 under Wine: render targets sharing physical pages saves about 1.9 GB from the menus on, but the world load still fills a 12 GB card.
main |
this PR | |
|---|---|---|
| local / target pages (pools) at 24 s | 7263 / 3561 (3648) MB | 5433 / 1702 (1792) MB |
| same at 60 s | 8693 / 4626 (4800) MB | 6611 / 2711 (2752) MB |
| card full | 87 s | 90 s |
Stacked with #2306 (XCL_TEXTURE_LEVEL_PAGES=1) and #1916, the same load stays at 5.8 GB local (2379 MB of pages at 60 s), against #2306 alone at 8.3 GB. I merged #2306 on top by hand (both change Pages::bind; I passed phys through #2306's bind_range, with &[] from map_levels, because lazy levels are only for sampled textures and phys only for GPU-owned ones). Head de4d1f6.
Tested (head de4d1f6, merged onto main 06c9f55, no conflicts unless noted)
- AMD Radeon RX 6700 XT 12 GB (RDNA2, gfx1031, RADV, Mesa 26.3.1), Ryzen 7 5700X, 16 GB RAM, Linux 7.3.5 (CachyOS)
- proton-cachyos 11.0-20261015 Wine, vkd3d-proton v3.1 + #257's patch (dxil-spirv
53aac418from #775), DXVK v3.1.1-97dxgi - release build,
XCL_COHERENT_MB=512(the 4095 MB learned window is ~1 fps here, #284),XCL_ACTIVITY=1 - A retail title from a cold start: it goes from the menus into its world load at about 50 s. Numbers are the activity log's
memory:line; "card full" means sysfsmem_info_vram_usedreached 11.5 GB, where my guard stops the run (a full card has crashed the compositor here before).
Not tested
cargo testunder Wine: these were title runs only.- Whether the aliased render targets show the right pixels: I did not check image quality.
AI use
- Claude Code (Claude Opus 5.5) merged, built and ran this and wrote the report; I checked the results.
A retail game (retail title) maps one physical page under render targets at two addresses at once – aliasing targets that are never live together, which the console allows. kernelx keeps a page at one address (
map_pagesmoves it), andvram::Pageskeyed video memory by title address, so each alias got pages of its own. In the game's first 40 s, 422 render targets (2.1 GB) had their pages mapped under 276 other render targets (1.85 GB), and the game kept using both sets (barriers and views after the move). The duplicate cost 1.85 GB of video memory, and what the GPU wrote through one alias never showed in the other.A GPU-owned texture's owned pages are now keyed by the physical page mapped at their address, else by the address as before. Sampled textures keep address keys. Part of #320 (8 GB cards) and #345.
What is in it
crates/xcl/src/hle/kernelx.rs:physical_pages(va, n): the physical page mapped away at each 64 KiB page (read-only,AWAYonly).crates/xcl/src/hle/d3d12x/vram.rs:page_key(PHYS_KEY | pagefor a page with a physical page, else the address),physical_pages_under(GPU-owned only, asked beforePAGESis taken: kernelx takesAWAYand neverPAGES),bindtakes the physical pages and both its loops (counting the missing tiles, then taking them) usepage_key,Target.gpu_ownedsoremap_if_unmappedkeys the same way (it asks the physical pages withPAGESreleased, then takes it again);tiles_unaccounted_for(test only).crates/xcl/src/hle/d3d12x/title_textures.rs: GPU testrender_targets_on_one_physical_page_share_its_video_memory.Tested
stable-x86_64-pc-windows-msvc; tests debug, smoke release.main1a0bbe3(after D3D12.X: eliminate multi-heap UpdateTileMappings and per-texture Signal stalls in vram::Pages #1747 changedPages::bindandplace_on_pageslocking, and D3D12.X: reclaim empty 64 MiB VRAM pool heaps, alias GPU mirror pages, and sync 2048x128 glyph atlases #1985 addedcanonical_vabeforeplace_on_pagesasks the physical pages; they are still asked beforePAGESis taken). My first rebase (efedeea) left D3D12.X: eliminate multi-heap UpdateTileMappings and per-texture Signal stalls in vram::Pages #1747's new counting loop inbindon address keys: a tile leaked, orbindaborted, when the two keys differed (found by @pvfreis, @veyn-sudo, @thehollowedone). Fixed since5fa6950.cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4onde4d1f6: 1251 passed, 0 failed, 46 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware, fourlower::testsand the wave64 cases of thelower_dxilprograms), the per-lane form refused for some f16/f32 cases,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(needs Developer Mode)page_keyreturning the address) it fails:left: 131072, right: 65536. With onlybind's counting loop on address keys, it aborts atvram.rs:601(0xC0000409), and without that case it fails withleft: 2, right: 0(tiles lost). It skips below resource heap tier 2, wherevram::placekeeps no target on pages (Intel Arc, @JJAutoCompare), and takes its locks poison-tolerantly (@thiagocalile).main67a3735 vs this change on it):mainended at 178–215 s withCreateHeaprefused (0x8007000e) or a device removal at ~13.9 GB local video memory; with this change two runs had no0x8007000eand ended at 245 / 268 s in the title's null write at+0x23cf683(The retail title 1.0.2.1 (RTX 5070): reaches the end of the first-run setup, then deterministic 0xC0000005 write at 0x0 in game_scarlett_master.exe+0x23cf683 #846). One run each, not a measurement of The retail title 1.0.2.1 (RTX 5070): reaches the end of the first-run setup, then deterministic 0xC0000005 write at 0x0 in game_scarlett_master.exe+0x23cf683 #846.Regression run
Not tested
MapTitlePhysicalPages).MapTitlePhysicalPages(NULL, …)):kernelx::physical_pagesreports only pages mapped away, so a target at the home stays keyed by its address and an alias elsewhere gets a page of its own, as onmain(@Filip722 found this and has a fix on top of this PR).AI use
🤖 Generated with Claude Code