Repository navigation
D3D12.X: copy from the backing pages of GPU-only views - #768
philip-roy-jones wants to merge 3 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. |
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. |
|
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 |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
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 xcl-dev#319. Assisted-by: Codex (GPT-6.2 Astra, max reasoning effort)
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)
f13de96 to
953f9ee
Compare
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
RTX 3070 run of head NVIDIA GeForce RTX 3070 8 GB, driver 616.56, Windows 11 10.0.26100, rustc 1.100.0 MSVC, debug builds. Clean head and base each in their own worktree and target directory.
Not tested: the retail title, a release build, the base lib suite, and a merge with current main. AI use: Claude Code (Claude Opus 5.5) built both trees, ran the tests and wrote this. |
|
AMD RX 7800 XT test report for #768 at exact head Setup
Workspace suite,
The one failure is Backing-page copy, both submission paths (
Queue retirement controls, head, Not tested: the retail title and smoke runs (not allowed here), a release build, a merge with current AI use: Claude Code (Claude Sonnet 5.5) ran the builds and tests and wrote this report; coordinated by Codex (gpt-6.2-sol). |
Stacked on #473 by 7ROBE: the bottom commit is #473's and the top two belong here. Part of #319. Rebased onto
mainat08db802.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
Clean head
953f9eeand cleanmain08db802, each in its own checkout and target directory. Radeon RX 580 8 GB (driver 31.0.21925.1001), Ryzen 7 7700X, 32 GB, Windows 11 Pro 26200, Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11. Debug tests and release title runs.XCL_SAMPLE_*were unset.cargo build --locked --release -p xcl,cargo build --locked --workspaceandcargo test --locked --workspace --no-runsucceeded on both.cargo test --locked -p xcl --lib -- staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes copy_gpu_view_reads_each_mapping_and_leaves_holes_zero copy_scratch_budget_counts_resources_until_gpu_completion --test-threads=1 --nocaptureon head: 3 passed, 0 failed, no skips. The independent write took 1.098 ms, the upload references went 1/2/1 and the readback was0x1234abcd. Before the rebase, on the unfixed merge7cb9599with only that test added, the write took 10.010 s and the test failed.cargo test --locked -p xcl --lib -- hle::d3d12x:: --test-threads=4: main 253 passed, 0 failed, 2 ignored. Head 255 passed, 0 failed, 2 ignored; the two extra are this PR's tests. Each printed one SKIPPED (no mesh shaders).cargo test --locked --workspace --no-fail-fast -- --test-threads=4exited 101 on both, with the same result for every test binary. Thexcllib binary exits0xc0000005on this GPU. A single-threaded run on head stops ingpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_masks_hold_helper_lanes_on_triangle_edges, and with that test skipped neither build exits early. The other binaries gave 124 passed, 1 failed and 20 ignored on both, includinge2ewith the bundled title (4 passed). The failure isconsole_compute_without_an_exec_write_has_the_wave_size_of_its_headeringpu_compute_e2e: the driver refuses its compute pipeline (0x80070057).--skip gpu::dxil::lanes::ps_ballot_tests::gpu_direct_ps_masks_hold_helper_lanes_on_triangle_edges): main 1,176 passed, 127 failed, 27 ignored; head 1,178 passed, 127 failed, 27 ignored. The same 127 tests failed on both, all GPU tests ingpu::recompandgpu::dxil: 118 by device removal (0x887A0005), 8 by0x80070057andgpu_sparse_vram_descriptors_buffers_and_xmemby its GPU address assertion. Both printed the same 100 SKIPPED lines from 84 tests, which libtest counts as passed. 79 are missing features of this GPU (wave32, mesh shaders, 64-bit heap atomics). 21 found no usable device after the removals; thehle::d3d12xrun above covers those in that module.Regression run
scripts/smoke.ps1 -Game <retail folder> -Seconds <n> -Title Retail -OutDir <run folder>on this RX 580 with default settings. Each run had an emptyXCL_DATA_ROOTand its own copy of the same shader and driver cache (XCL_DXIL_CACHE). On this GPU both builds fast-fail inamdxc64.dllabout 8 s in (0xc0000409at offset0x14e8d85, the crash #2038 fixes). With-Seconds 60, main stopped at 7.98 s and the PR at 8.29 s, both after 60 presents between 4 and 6 s and before a final frame count. The blocks are therefore of 7-second runs, which end before that point.The 7 frames between them come from when the first frames appeared: 1 present against 12 between 2 and 4 s. In the 60-second pair it was the other way round (15 against 8). The previous head
f13de96, which had the same changes before this rebase, ran for 60 s on an RX 9070 with 1,631 frames against 1,618 onmain. Toons29's RX 9070 resultsNot tested
CopyMemoryToMemoryXfrom outside unified memory. Only the unit tests and the bundled title exercise it.AI use
claude-opus-5-5; its reasoning-effort setting is not visible to it) rebased the PR ontomain08db802and resolved the conflicts inreal.rsandtitle_textures.rs, keeping both sides. It checked that the rebase left the PR's added and removed lines unchanged, ran the RX 580 builds, tests and retail runs above and updated this description. Reviewed on Philip's behalf.🤖 Generated with Claude Code