Repository navigation
Conversation
|
Test report: RTX 5080 (wave32), head Tested
Not tested
AI use
|
…GPU-view page shows Queue method ivall#31 (ivall#29 of the older layout) maps pages of the title's memory into GPU views; it was a stub. Its batches are now decoded and checked against the batch count and the pool, and each 64 KiB page of a GPU view records the pool page it was given and the physical page the title had mapped there (kernelx::mirrors). A bad call records nothing; releasing a view drops its pages. XCL keeps a physical page's data where it was mapped last, and the title maps most streamed pages into the CPU view behind the GPU view too, so `mapped_source` answers where that page is now (`page_now`), else the pool page itself. Each title mapping is remembered per address (Away::title), written once the page is in place and forgotten when the reservation goes; a page freed while its allocation lives is no longer looked for (Away::freed). Nothing reads the record yet: textures are unchanged; the queue logs its counts. (ivall#1031) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hod put under it Each 64 KiB page of a texture in a GPU view is read from what queue XCL keeps it, zeros for an unmapped page, the CPU view for a page the method never mapped (`source_of`, `Source::Pages`). The textures on the pages a call changes, or whose physical page moved, are looked at again at the next submit (`mirrors::take_changed`, `page_moved`), not all of them. Their writes are watched where the pages are. (ivall#1031) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
59042fd to
c387de2
Compare
|
Thanks for the run, @IvyNotFound. It matches what I see: textures in GPU views now read their pages, and the frames after loading stay black or flat grey, as on
AI use: Claude Code (Claude Opus 5.5) wrote this reply. |
|
Confirming #1102 (with #1055) on an RTX 3070 (8 GB VRAM) / 16 GB RAM, Windows 11, applied on top of #605 (R9G9B9E5 → R11G11B10, needed so Series S does not assert at startup). Series X (anaconda): with #1102 the retail title now renders fully visible 4K frames — 518400/518400 sampled pixels non-black, real scene colors (dark intro tones) — where before every sampled frame was black. CopyPageMappingsBatchX decode is active (e.g. Series S (lockhart, 1080p — fits 8 GB): stable ~30 fps for 240 s+, no crash, but frames stay black on this setup even with #1102. The per-frame ID3D12GraphicsCommandList10 #126/#142 are still stubbed here, so a visible Series S frame appears to also need those (#616 / #1031 family). Net: #1102 moves GTA VI from all-black to visible with correct textures in Series X. Thanks for this! Tested with Claude Code (AI-assisted). No game data attached. |
|
A note on overlap, from a local change that touches the same textures (not a PR, and I won't open it as it is because of this PR). What I measured: GTA VI 1.0.2.1, RTX 2060 SUPER 8 GB, i5-9400F, 16 GB RAM, The local change: keys a GPU-view page texture's owned pages by the physical page at its CPU-view source (the Why it collides with this PR: those "nothing behind" pages are very likely the ones the title maps with Question: does #1055 keep the GPU-view page → physical page mapping somewhere AI use: Claude Code (Claude Opus 5.5) wrote the diagnostic and the change and ran the measurements on my PC; it also drafted this note. |
|
Fresh Series X (anaconda) on an RTX 3070 (8 GB) / 16 GB RAM: steady 30 fps with visible, correctly-textured frames throughout the 90 s window (0 device removals, 0 crashes). On this 8 GB card the 4K path later hits the known device-removed, but not within the smoke window. Tested with Claude Code (AI-assisted). No game data attached. |
|
Thanks @MKmajster, that's the first report of visible world frames with these two PRs. I'll keep the 8 GB VRAM device removal and the Series S @3L1A5-1, yes: the mapping is kept, and Where it is (
Order: the record is made when the title calls queue #31, on the CPU, in the order of its queue calls. It is not deferred to the GPU timeline, as XCL runs other queue methods. So a submit sees the mappings of every call made before it, which I think is what your "before the next submit" needs. Nothing would tell you that a submit made earlier still reads the old pages. So I'd say: rebase onto #1055/#1102 once they land. Give a NULL tile only where both are true:
Ask me anything about those calls. AI use: Claude Code (Claude Opus 5.5) wrote this reply. |
|
Tested
Not tested Native Windows from this build, or rendered gameplay on this adapter. AI use OpenAI Codex with GPT-6.2-Sol high prepared the integration, ran the tests, and wrote the report. |
|
Tested #1055 (f532d33) and #1102 (c387de2) together on an RX 7900 XT, Windows, main 930e8b4 with the same downstream sparse-release, texture-budget and physical-page changes in both runs. The saved Series X profile and initial XCL caches matched. A was delivered on the rendered Player1 prompt at 33 s. Both runs had DRED and the same 28 GiB Windows job limit. The comparison build called queue method 31 as a stub at 6.213 s and accessed a GPU-view texture at 10.648 s. With the two PRs applied the title exercised the new implementation: at 93.622 s the counters reported 256 calls, 35,111 pages mapped to title-mapped physical pages, 2,368 unmapped, zero elsewhere ignored. The four focused page-mapping and texture-source tests all passed. The comparison run later logged device hung and a DRED page fault. The patched run instead logged command-list Close returning 0x8007000e at 133.130 s, followed by a breakpoint on the same thread. Peak sampled process commit was 28,329 MB, with zero logged device removals in that run. One run each under a memory cap verifies the title reaches the new mapping code; stable gameplay and correction of the comparison GPU fault are still unverified. Follow-up on the same RX 7900 XT with #1422 also applied, a 2048 MB soft texture budget and timed in-process thread dumps disabled. The title again reached world loading. The external observer recorded Windows 0xc0000409 (subcode 7). The faulting thread stack contained Rust allocation-error handling, title_textures::Source::bytes, subresources_of and its worker. The mapped-page path allocates a contiguous scratch buffer for a slice. Peak sampled process commit was 28,294 MB under the same 28 GiB whole-job cap. This localizes an allocation failure under that cap. The allocation size and the rest of the process memory breakdown were not recorded. Local follow-up: I tested a bounded mapped-texture reader that borrows contiguous spans and streams scattered or missing input through 64 KiB regions for detiling and hashing. A byte-for-byte test passed for mip chains, arrays and a volume with non-aligned runs and holes. On the next title run the original texture allocation abort did not recur; at about 180 s a different thread faulted in SDK dxcompiler.dll while XCL was compiling a shader. Peak sampled process commit was 28,416 MB under the same 28 GiB job limit. The scripted A was delivered at 33 s versus 20 s in the previous run, so elapsed time is not a controlled performance gain. World loading remains unresolved. With two DXC workers the bounded-input build next failed allocating the decoded mip output. I then detiled mapped textures directly into checked D3D12 upload footprints. The focused regression verified exact pixel bytes, untouched row padding, and the short last row; the native GPU readback and upload-buffer reuse test passed. In the title, at least 256 direct batches ran. At 228.505 s it exited with DXGI_ERROR_DEVICE_HUNG, DRED GPU VA 0x1b0679000 and a partially completed command list whose next operation was Dispatch. No texture-allocation abort in that run. The playable world remains unverified. |
Integrates upstream PRs ivall#1055 and ivall#1102 (issue ivall#1031) and ivall#1070 (issue ivall#1040). Assisted-by: xcl-ops (deepseek-v4.1-flash) Trace-Issue: ivall#1031
|
A follow-up from an RX 7900 XT on Windows. On a downstream XCL stack carrying this mapping work, I reproduced a texture ownership error after a GPU write and a backing change. The native-adapter fixture uses a 64×64 R8 texture and the public physical-page mapping path.
On this stack the remap scheduled a full upload but kept the old gpu_written flag. The later CPU write was filtered out. My local prototype clears the previous ownership and cached content hash when the upload source changes. A newly recorded GPU copy checks its current backing before claiming ownership. The regression also exercises equal bytes in the old CPU mirror and the replacement page, and the inverse ordering where a GPU write recorded just after the remap must survive a later stale CPU write. All 16 title texture tests passed on the modified build. The game impact remains unverified. Game follow-up, one run each with the same Series X save, controls, starting caches, and application build settings. With the texture fix the last positive present interval ended at 196.1 s; DRED reported a GPU page fault at 0xf000 at 198.0 s. The matching mesh-enabled control last presented at 186.1 s and faulted at 0x6000 at 191.1 s. No allocation was named at either address. The final captured images were dark. The native pixel regression is fixed; this pair does not show a world-loading fix. |
|
Follow-up to my overlap note above: the local change that keys GPU-view page textures by the physical page is now rebuilt on this PR, as you described: a GPU-view page takes its key from the method's record ( Tested
The two runs match within ~20 MB up to 70 s and split when world streaming starts. Not tested
AI use
|
|
Code review on
Items to address before undrafting / merging after
|
|
Measurements for raylitebull's point 1, and a second cost in the same path. At
Both times are what the "view-source recheck" and "hash" parts of the Not tested: Windows ( AI-assisted. Claude Code, Claude Opus 5.5. |
|
The PR shows a conflict with
AI-assisted (Claude Code). No game data attached. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
Stacked on #1055: only the last commit (
59042fd) is this PR. I'll rebase it once #1055 is merged.A texture in a GPU view now reads each of its 64 KiB pages from what queue #31 (
CopyPageMappingsBatchX) mapped there:On the retail title of #505 about 43% of the mapped pages had their physical page at the pool address, while the texture read the CPU view's same offset. That offset is not committed, so those parts of textures went up as zeros (#1031, the correction there).
What is in it
crates/xcl/src/hle/d3d12x/title_textures.rs:Sourcereplaces the single address a texture was read from. It is either one address (At, as before) or runs of the texture's bytes from several addresses (Pages; address 0 means zeros). Uploads, the unchanged-content check, the detile and the write watch all go through it.source_of(va, len)builds it. A texture whose pages form one run comes back asAt, so it costs what it did before. A texture outside GPU views, or one whose pages the method never mapped, isAt(mirror_source(va))as before.recheck_gpu_view_sourcesre-reads the source only of the textures on pages the method changed, or whose physical page moved (mirrors::take_changed, found throughby_va). Looking at all of them took 225 ms on 64k textures, and the method is called hundreds of times. A change ofgpu_view_map_gen(physical pages mapped into a GPU view directly) still looks at all of them, as before.crates/xcl/src/hle/kernelx.rs,mirrors:page_moved(page)is called where a physical page is mapped, unmapped (unmap_away) or freed, so a texture follows its page when the title maps it into the CPU view too.a_page_mapped_texture_is_read_page_by_page: runs, zeros, the CPU view for untouched pages, one run as one address, the watched ranges and the dirty check.gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changesgets three steps on the GPU, each read back from the PC texture:source_ofreduced to the oldmirror_source(checked).On the retail title (
main67a3735+ #1055, with and without this PR; RTX 4080; A pressed throughXCL_PRESS_AT; one run each)Textures whose memory is all zero.
XCL_TRACE_FRAME=1logs how many textures are all zero in 16 samples of 4 KiB over their memory. The snapshots don't fall at the same moments in the two runs:A texture can be zero on purpose, so this is a trend rather than a count of fixed textures.
Nothing slower. Over the whole run (presents / submits / draws), and when the first
#101and the watchdog come:#10132,768+ textures were kept in step "with its pages", most of them as one run.
The run still ends at the title's watchdog (
+0x23cf683), as onmain. That stop is about stalled GPU work (Newer retail title (TitleID 7952987A): reaches world loading, then the title's GPU watchdog ("GPU Loc Sig") after ListX #101 stub #505), not about textures.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on59042fd: 738 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).Regression run
main:
PR:
Not tested
XMemMapPhysicalPagesinto the view): the method's mapping wins here, whichever came last.AI use
🤖 Generated with Claude Code