Repository navigation
Conversation
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>
…gets Keep explicitly mapped home addresses associated with their live physical pages across moves, unmaps and partial releases. Verify the mapping lifecycle and GPU readback in both directions with an independent target. Assisted by OpenAI Codex.
|
Native Windows verification of 244aa780 stacked on #1182. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug. Tested
Not tested AI use |
|
Independent native Windows RX 6800M verification of exact stacked head Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M, driver Fixed head: Test-only negative control: I kept the current GPU fixture and replaced only Scope: Focused debug-build regression and mapping-lifecycle tests. I did not run the full workspace suite or a retail-title smoke on this stacked head; the test demonstrates the synthetic two-target alias sequence, not title-world rendering. AI use: OpenAI Codex prepared the test-only control, ran the AMD tests, compared per-direction texel counts, restored the exact clean PR head, and drafted this report. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
RTX 4060 Laptop / Wine integration verification of the top commit 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 tests:
Six unique tests passed, no failures or skip notices. A→B and B→A each matched 16,384/16,384 patterned texels; both direct writes and the independent-page control also matched 16,384/16,384. Release build passed. After the test-only import cleanup, Bounded title check: retail 1.0.2.1, offline, Series S profile, saved first-run settings, Not tested: retail use of this specific alias sequence, memory savings attributable to this fix, sustained world rendering, native Windows, clean PR head, or other GPUs. AI assistance: omp / openai-codex/gpt-6-astra performed the integration, verification and report. Credit for the fix and fixtures remains with this PR's authors. |
Stacked on #1182 at
5fa695050a0ccaa82298e45799224422f5e2781e. Only the top commit belongs to this PR. Request for a separate PR.A render target created at the address returned by
MapTitlePhysicalPages(NULL, …)could read stale pixels after the same physical page moved to a second address. A 128×128 RGBA8 readback on the RTX 5060 Laptop reproduced the problem in both directions while both textures were alive.What is in it
Tested
4522cc1a8b1347f+).5763f5a. Cross-address reads matched 0/16,384 patterned texels in each direction, while all direct reads and independent-page checks matched 16,384/16,384. With the original fixd3887f2, both directions and all controls matched 16,384/16,384. An independent native Windows tester reproduced this on an RTX 3080 Ti. Proton result · Windows result.244aa780, both alias directions, both direct checks and the independent target again matched 16,384/16,384 texels. All ten exact tests passed individually with one test thread and no reported skips. These included the new mapping lifecycle test, the parent’s updated sparse tile-accounting test and seven neighboring mapping cases.568e7dbran 20 executables, 1,148 passed, 6 failed, 46 ignored. The stacked PR ran 19 executables, 972 passed, 6 failed, 45 ignored. Its parent uses an older main revision with fewer tests. All harnesses completed. Both revisions failed the same six cases covering depth-buffer UAV flags, Opus and XMA2 voice playback, the synthetic title end-to-end test, PLS disk quota and predication.Regression run
Both clean checkouts ran their own
scripts/smoke.ps1against the same offline title for 15 seconds with independent Proton prefixes, an RTX 5060 filter and a 512 MiB coherent window. Wine returned 0 MB for the process commit measurement in both runs.Main
PR head
Not tested
Native Windows on this stacked revision, AMD and Intel adapters, and sustained world rendering. In a longer matched comparison of the earlier PR head and its home-mapping fix, both builds produced black native present-source samples before the external host-memory guard stopped them. Retail use of this specific mapping sequence remains unverified.
AI use
OpenAI Codex (GPT-6.2-Sol, high) wrote the fix and tests, ran them on this laptop, and prepared this PR.