Repository navigation
D3D12.X: copy from the backing pages of GPU-only views - #768
philip-roy-jones wants to merge 4 commits into
Conversation
70dfae4 to
5ce1b4d
Compare
|
RX 7900 XT, Windows 11 build 26100, native D3D12, offline Series S title profile.
AI use: Codex (GPT-6) ran the checks and prepared this report. |
5ce1b4d to
80c1790
Compare
A graphics-only reservation outside unified memory can have its data in a paired CPU view. Resolve each source mapping when ExecuteCommandLists or KickoffX fills the upload, so CPU changes after recording reach the copy. On an RX 580 a 16 KiB readback from each submission path previously had 16,320 wrong bytes. Both now match in full. Part of ivall#319. Assisted-by: Codex (GPT-6.2 Astra, max reasoning effort)
80c1790 to
6c0066b
Compare
|
@crosettiremi, thanks for the 1,109-frame menu run on On each clean checkout, build with Posted at Philip’s request via Codex (GPT-6.2 Astra, max reasoning effort). |
|
Two effects of keeping the upload buffers alive through 1. XCL's last reference to the buffer can go before the copy has run. The worker gives a job up after 2. The copy can hold up other queues' CPU writes. The worker is one thread and takes jobs one after the other, so Seen with a scratch test in
The test holds one reference itself, so nothing was freed early in it. That no other reference is left after Possible fix: keep an upload buffer until its fence is reached, without a time limit and outside the worker's queue (for example a list of (fence, value, buffer) looked at on each submit). #562 (a worker per queue) would end the second effect, not the first. Tested: Not tested: AI use: Claude Code (Claude Opus 5.5) found this, ran the test and wrote the comment; Codex (GPT-6.2 Astra) checked the claims and the draft by reading the code, without running anything. |
The CPU-write watchdog can abandon a pending upload after ten seconds and makes an unrelated queue wait behind it. Carry upload references across native submission and share the per-queue completion mark with copy scratch. The regression keeps a queue behind a fence, verifies an independent write, and checks the upload lifetime and readback after the list state is gone. Assisted-by: Codex (GPT-6.2 Astra, max reasoning effort)
|
Both points are fixed in
Tested: that one scratch test and Not tested: AI use: Claude Code (Claude Opus 5.5) read the change, ran the tests and wrote this. |
|
@coolpersonnn, could you run one 60-second retail smoke test on your RTX 5090 using clean #768 head Please use the same title, warm shader caches, default switch-window mode, settings and inputs as that run. On the clean head, build with Posted at Philip's request via Codex (GPT-6.2 Astra, max reasoning effort). |
|
Regression run of Against the limits in CONTRIBUTING.md: 101 % 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 |
Stacked on #473 by 7ROBE. Part of #319. Includes upstream
mainatc160d86.CopyMemoryToMemoryXdropped copies from a GPU-only reservation even when the paired CPU view held the data. The staged copy also put its upload buffer on a worker that gives up after ten seconds. A blocked copy could lose XCL's last reference while the GPU still needed it and delay a CPU write on another queue.What is in it
Read backing spans at submission, prefer directly mapped pages and zero the holes. Fill each submitted segment, including split lists and
KickoffX. The upload shares the submitting queue's fence with its copy scratch buffer. The bundled title checks late source writes on both submission paths. CuteBooty reported the timeout and cross-queue delay on an RTX 3070. The retirement code reuses zohaiblazuli's queue fencing. Review and measurements · Copy scratch fencing in #993Tested
Windows 11, native D3D12, Radeon RX 580, driver 31.0.21925.1001, Rust 1.100.0 MSVC.
cargo test --locked -p xcl --lib staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes -- --test-threads=1 --nocapture. On the unfixed merge7cb9599with only that test added, the independent write took 10.010 s and the held queue had lost XCL's reference. The test failed. On clean headf13de96it took 1.595 ms (1.458 ms in the group run). Across the 10.25-second stall and subsequent fence completion, upload references went 1/1/1 before and 1/2/1 after. The test kept its own reference throughout. Readback after opening the gate was0x1234abcdon both revisions, as expected. Head passed twice with zero skips.cargo test --locked -p xcl --lib hle::d3d12x:: -- --test-threads=4 --nocapture. Clean mainc160d86reported 145 passed, 0 failed, 1 ignored. Clean headf13de96reported 147 passed, 0 failed, 1 ignored. Both pass totals include one hardware skip,placed_title_textures_share_vram_and_preserve_pixels, because this adapter could not create a reserved cube with mips.cargo check --locked --workspace --all-targetspassed on head.cargo test --locked --workspace --lib --no-fail-fast -- --test-threads=4 --nocaptureexited0xc0000005in the XCL test process on both revisions. Running the unreported tests in batches with the same library harness accounted for all 831 tests on main and 833 on head. Main reported 787 passed and head 789. Both had the same 21 assertion failures, 22 ignored tests and one process exit ingpu_wave64_ps_whole_wave_reductions. Each pass total includes the same 21 hardware skips (15 without wave32, four without mesh shaders, one without the requested wave32/wave64 combination and one reserved cube).Regression run
Toons29 ran
scripts/smoke.ps1on cleanmainand this PR’s clean head with the same retail title, Radeon RX 9070 and 60-second duration. Both runs usedXCL_NETWORK=0. Toons29’s RX 9070 results and setupThe PR showed 1,631 frames versus 1,618 on
main. Both runs exited cleanly with zero crashes and zero device removals. Coverage of the changed copy path in this retail run is unverified.coolpersonnn also recorded 1,670 frames on
c160d86in a separate 60-second RTX 5090 control using warm shader caches and the default switch-window mode. The matching RTX 5090 head run is pending. RTX 5090 control · Head-run requestThe previous local pair,
47efa2eand6c0066b, presented frames and both exited with0xc0000409before 60 seconds. The RX 7900 XT report of 1,109 frames used the earlier70dfae4. Request for current-head smoke blocks · Earlier RX 7900 XT resultsNot tested
A full workspace run through the bundled title and controllable retail gameplay on this revision. The RX 9070 whole-suite report covered the previous head
6c0066b. Earlier RX 9070 resultsAI use
Codex, GPT-6.2 Astra running on max reasoning effort, wrote the GPU-view change and regression tests, addressed the review, ran the native comparisons and prepared this description.