Repository navigation
D3D12.X: stage GPU-view CopyMemoryToMemoryX sources and shift newer CL1 remaps - #1995
raylitebull wants to merge 1 commit into
Conversation
Hardware test report — commit
|
|
@eizispark Thank you for the RX 9070 XT verification (997 passed, |
|
Technical review findings: Major
Minor
|
3fcc982 to
50ef7dc
Compare
|
Thanks for the careful review and catches, Updated
Verified locally ( |
|
Regression run for this PR: head main this PR: No device removals or crashes; 101 % of main's frames, 93 % of its peak commit. Not tested: the whole suite; world loading; whether the title reaches all of the changed code in these 60 s (default settings: Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
Empirical verification — PR #1995 (
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
Thanks @Toons29 for running and sharing the exact-head 60 s |
50ef7dc to
bdfb2fb
Compare
|
Rebased
|
|
Thanks @Toons29 for running and sharing the exact-head 60 s |
|
Tested an adapted integration of this PR on Linux/Wine with vkd3d-proton and an RTX 4060 Laptop GPU (8 GiB), using the GTA VI Xbox 1.0.2.1 title through its initial world-load path. The integration also contains #877 and the Wine native-vtable changes from closed #1395, which this title currently needs to boot with stock assert-enabled vkd3d-proton. Build/tests:
Runtime result: the title reached illustrated loading screens and sustained 29.8 fps over the last 300 presents before my 7.5 GiB VRAM safety guard terminated it. DirectStorage reported 0 failed requests and there was no crash/device removal. However, the real 16 KiB operation this was intended to cover still took the fallback, not the new staging path: Correction after source review: the absence of a staged-copy log does not prove The control also reached this fallback. These results verify build/unit tests and boot/loading regression only, not successful GPU-view staging or playable gameplay. AI-assisted test and source review. |
sync_title_buffers copied the drawn range of every mirrored buffer at every draw. On a retail game's menus that was ~1,200 copies and 10.7 MB per 2 s, of buffers the title never rewrites (xcl-dev#2389). A mirror's source in write-watched memory (kernelx reserves GPU-visible title memory that way) now has its written pages copied only: a draw asks GetWriteWatch without reset for the pages written since the last look, and adds the pages the look took off the write-watch since the mirror's last copy. title_textures' look watches the mirror sources and hands those pages on (list_x::mirror_pages_written), so a page written after a draw's copy and reset by the look is still copied at the next draw. A draw that overlaps a look (MIRROR_LOOK_SEQ odd or changed) copies its whole range, as does one whose source is not write-watched. The stale-page bits live beside MIRRORS, not in it, so as not to conflict with xcl-dev#1995, which re-keys MIRRORS. The look also runs when mirrors exist with no sparse window and no title texture (it returned at once there, so the sources were never reset and every draw copied every page ever written; review on xcl-dev#2478). Part of xcl-dev#2393 (the copies; the index scan is cached in the next change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stages GPU-view
CopyMemoryToMemoryXsource ranges (kernelx::mirrors::source_range,resolve_readable_source,list_x::MIRRORS) and shifts vacated older CL1 command-list remap slots104/105to console-extension stubs whenQUEUE_SHIFTED == true.Part of #1833.
What is in it
crates/xcl/src/hle/kernelx.rs: addmirrors::source_range(va, len)enforcing(va - gpu) + len <= sizeend-of-range bounds on GPU mirror reservations (preserved alongside#1985'smirrors::gpu_views_of).crates/xcl/src/hle/d3d12x/list_x.rs: routecopy_memory_x(saturating_addoverlap check) throughresolve_readable_source, and keylist_x::MIRRORSby(title_start, cpu_src_start, len, uma_mirror)so repeatedgpu_vabinds hitmirrored(va, bytes)directly with zero per-drawVirtualQuerywhilesync_title_buffersreads fromcpu_src_start.crates/xcl/src/hle/d3d12x/real.rs: route vacated older CL1 slots104/105to console-extension stubs whenQUEUE_SHIFTED == trueand add unit testsresolve_readable_source_accepts_direct_and_rejects_unmappedandnewer_cl1_slots_shift_older_cl1_remaps_by_two.Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13), rebased cleanly ontof368928(bdfb2fb).cargo check --workspace --tests: passed onbdfb2fb.cargo test -p xcl --lib resolve_readable_source_accepts_direct_and_rejects_unmapped: passed onbdfb2fb.cargo test -p xcl --lib newer_cl1_slots_shift_older_cl1_remaps_by_two: passed onbdfb2fb.50ef7dc): verified across AMD Radeon RX 9070 (1635/1623frames, 0 device removals/crashes,@Toons29), NVIDIA RTX 3060 Ti, and Intel Arc A770.Regression run
bdfb2fb1by@Toons29(AMD Radeon RX 9070, 60 s retail title smoke vs1a0bbe3a):0device removals,0crashes,1628 -> 1627frames (100%),14561 -> 14598 MBpeak commit (100%).Not tested
scripts/smoke.ps1pair on rebased headbdfb2fb, fullcargo test --workspacesuite, runtime GPU execution across AMD / NVIDIA / Intel hardware, and Linux/Wine/vkd3d-proton.AI use
f368928, and unit tests; the author reviewed the diff and test output.