D3D12.X: copy from the backing pages of GPU-only views #768

Open
github-bot wants to merge 3 commits from github-bot/gh-768 into main AGit
Owner

@⁠philip-roy-jones on GitHub · 2026-11-24 04:58 UTC · original
philip-roy-jones:d3d12x-mirrored-copy-sources → main · +339 −50 · 5 files · 3 commits · open

Stacked on #473 by 7ROBE: the bottom commit is #473's and the top two belong here. Part of #319. Rebased onto main at 08db802.

CopyMemoryToMemoryX dropped 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 #993

Tested

Clean head 953f9ee and clean main 08db802, 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 --workspace and cargo test --locked --workspace --no-run succeeded 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 --nocapture on head: 3 passed, 0 failed, no skips. The independent write took 1.098 ms, the upload references went 1/2/1 and the readback was 0x1234abcd. Before the rebase, on the unfixed merge 7cb9599 with 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=4 exited 101 on both, with the same result for every test binary. The xcl lib binary exits 0xc0000005 on this GPU. A single-threaded run on head stops in gpu::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, including e2e with the bundled title (4 passed). The failure is console_compute_without_an_exec_write_has_the_wave_size_of_its_header in gpu_compute_e2e: the driver refuses its compute pipeline (0x80070057).
  • The lib tests again with only that test skipped (--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 in gpu::recomp and gpu::dxil: 118 by device removal (0x887A0005), 8 by 0x80070057 and gpu_sparse_vram_descriptors_buffers_and_xmem by 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; the hle::d3d12x run 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 empty XCL_DATA_ROOT and its own copy of the same shader and driver cache (XCL_DXIL_CACHE). On this GPU both builds fast-fail in amdxc64.dll about 8 s in (0xc0000409 at offset 0x14e8d85, 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.

xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: Radeon RX 580 Series
title: Retail
seconds: 7
exit: 0x0
frames shown: 84 (PresentX 84)
presents per 2 s (last 3): 0 12 49
device removals: 0
crashes: 0
peak commit: 9145 MB
xcl-smoke v1
commit: 953f9ee0ce38eabc12bb21b1c29fa95b14ad287f
gpu: Radeon RX 580 Series
title: Retail
seconds: 7
exit: 0x0
frames shown: 77 (PresentX 77)
presents per 2 s (last 3): 0 1 47
device removals: 0
crashes: 0
peak commit: 8566 MB

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 on main. Toons29's RX 9070 results

Not tested

  • A 60-second regression run of this revision: on the RX 580 both builds fast-fail at about 8 s (#2038). Physical NVIDIA, Intel and AMD RDNA GPUs on this revision.
  • The changed copy path in the retail title. These runs stay in the menus, and none of them logged a CopyMemoryToMemoryX from outside unified memory. Only the unit tests and the bundled title exercise it.
  • World load and gameplay.

AI use

  • Codex, GPT-6.2 Astra running on max reasoning effort, wrote the GPU-view change and regression tests, addressed the review, ran the earlier native comparisons and prepared the earlier description.
  • Claude Code with Claude Opus 5.5 (claude-opus-5-5; its reasoning-effort setting is not visible to it) rebased the PR onto main 08db802 and resolved the conflicts in real.rs and title_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

**@⁠philip-roy-jones** on GitHub · 2026-11-24 04:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/768) `philip-roy-jones:d3d12x-mirrored-copy-sources` → `main` · +339 −50 · 5 files · 3 commits · open Stacked on #473 by 7ROBE: the bottom commit is #473's and the top two belong here. Part of #319. Rebased onto `main` at `08db802`. `CopyMemoryToMemoryX` dropped 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](https://git.gtahub.st/github/xcl-dev--xcl/pulls/768) · [Copy scratch fencing in #993](https://git.gtahub.st/github/xcl-dev--xcl/pulls/993) **Tested** Clean head `953f9ee` and clean `main` `08db802`, 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 --workspace` and `cargo test --locked --workspace --no-run` succeeded 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 --nocapture` on head: 3 passed, 0 failed, no skips. The independent write took 1.098 ms, the upload references went 1/2/1 and the readback was `0x1234abcd`. Before the rebase, on the unfixed merge `7cb9599` with 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=4` exited 101 on both, with the same result for every test binary. The `xcl` lib binary exits `0xc0000005` on this GPU. A single-threaded run on head stops in `gpu::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, including `e2e` with the bundled title (4 passed). The failure is `console_compute_without_an_exec_write_has_the_wave_size_of_its_header` in `gpu_compute_e2e`: the driver refuses its compute pipeline (`0x80070057`). - The lib tests again with only that test skipped (`--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 in `gpu::recomp` and `gpu::dxil`: 118 by device removal (`0x887A0005`), 8 by `0x80070057` and `gpu_sparse_vram_descriptors_buffers_and_xmem` by 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; the `hle::d3d12x` run 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 empty `XCL_DATA_ROOT` and its own copy of the same shader and driver cache (`XCL_DXIL_CACHE`). On this GPU both builds fast-fail in `amdxc64.dll` about 8 s in (`0xc0000409` at offset `0x14e8d85`, 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. ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: Radeon RX 580 Series title: Retail seconds: 7 exit: 0x0 frames shown: 84 (PresentX 84) presents per 2 s (last 3): 0 12 49 device removals: 0 crashes: 0 peak commit: 9145 MB ``` ``` xcl-smoke v1 commit: 953f9ee0ce38eabc12bb21b1c29fa95b14ad287f gpu: Radeon RX 580 Series title: Retail seconds: 7 exit: 0x0 frames shown: 77 (PresentX 77) presents per 2 s (last 3): 0 1 47 device removals: 0 crashes: 0 peak commit: 8566 MB ``` 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 on `main`. [Toons29's RX 9070 results](https://git.gtahub.st/github/xcl-dev--xcl/pulls/768) **Not tested** - A 60-second regression run of this revision: on the RX 580 both builds fast-fail at about 8 s (#2038). Physical NVIDIA, Intel and AMD RDNA GPUs on this revision. - The changed copy path in the retail title. These runs stay in the menus, and none of them logged a `CopyMemoryToMemoryX` from outside unified memory. Only the unit tests and the bundled title exercise it. - World load and gameplay. **AI use** - Codex, GPT-6.2 Astra running on max reasoning effort, wrote the GPU-view change and regression tests, addressed the review, ran the earlier native comparisons and prepared the earlier description. - Claude Code with Claude Opus 5.5 (`claude-opus-5-5`; its reasoning-effort setting is not visible to it) rebased the PR onto `main` `08db802` and resolved the conflicts in `real.rs` and `title_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](https://claude.com/claude-code)
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 #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)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:52 +00:00
Author
Owner

@⁠crosettiremi on GitHub · 2026-11-24 05:15 UTC · original

RX 7900 XT, Windows 11 build 26100, native D3D12, offline Series S title profile.

  • Clean PR head 70dfae4, isolated empty application caches, 60-second retail smoke at the menu, no input. Exit 0, 1,109 frames shown, last three 2-second present counts 60 / 60 / 60, zero crashes or device removals, peak process commit 18,831 MB.
  • For coverage past the account picker I tested this change on my local integration build. Six prior world-loading runs had dropped a 16 KiB CopyMemoryToMemoryX. With the patch the call took the GPU-view upload path at 42.487 s. In a separate instrumented 60-second run the upload was filled at submission at 53.684 s. All 16,384 sampled bytes in that upload were zero. This cannot distinguish a valid zero source from an unmapped page. The retail destination was not read back. That run exited 0 with 1,370 presents and zero device removals.
  • In the longer integration run the title encountered E_OUTOFMEMORY on 64 MiB heap allocations close to the test job's 28 GiB limit and exited 0xc0000409. Gameplay remains unverified. The integration suite reported 738 passed, 0 failed, 41 ignored, including a counted pass that printed a missing xgameruntime.dll skip.

AI use: Codex (GPT-6) ran the checks and prepared this report.

**@⁠crosettiremi** on GitHub · 2026-11-24 05:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7122783505) RX 7900 XT, Windows 11 build 26100, native D3D12, offline Series S title profile. - Clean PR head `70dfae4`, isolated empty application caches, 60-second retail smoke at the menu, no input. Exit 0, 1,109 frames shown, last three 2-second present counts 60 / 60 / 60, zero crashes or device removals, peak process commit 18,831 MB. - For coverage past the account picker I tested this change on my local integration build. Six prior world-loading runs had dropped a 16 KiB CopyMemoryToMemoryX. With the patch the call took the GPU-view upload path at 42.487 s. In a separate instrumented 60-second run the upload was filled at submission at 53.684 s. All 16,384 sampled bytes in that upload were zero. This cannot distinguish a valid zero source from an unmapped page. The retail destination was not read back. That run exited 0 with 1,370 presents and zero device removals. - In the longer integration run the title encountered E_OUTOFMEMORY on 64 MiB heap allocations close to the test job's 28 GiB limit and exited 0xc0000409. Gameplay remains unverified. The integration suite reported 738 passed, 0 failed, 41 ignored, including a counted pass that printed a missing xgameruntime.dll skip. AI use: Codex (GPT-6) ran the checks and prepared this report.
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-24 18:05 UTC · original

Two effects of keeping the upload buffers alive through cpu_writes (head 6c0066b), when the queue of such a copy is held by a long wait.

1. XCL's last reference to the buffer can go before the copy has run. The worker gives a job up after WAIT_MS (10 s from when it starts to wait for it) and drops the KeepAlive although the fence is not there. Until the list is reset, its state holds another reference. After KickoffX has returned (it takes pending_uploads out of the state) or after a Reset of the list, I found nothing else that does. The copy may then still be ahead on the GPU.

2. The copy can hold up other queues' CPU writes. The worker is one thread and takes jobs one after the other, so Immediate / ReadbackU64 jobs behind the copy's job wait with it, whichever queue they are for, up to 10 s for each such job. Lists with CPU writes already do that on main; this adds lists whose only job is the copy. (main skips these copies and queues nothing for them.)

Seen with a scratch test in cpu_writes.rs: queue B waits for a fence and executes a list with a CopyBufferRegion from an upload buffer, then after(B, [KeepAlive(buf)]) and after(A, [Immediate(..)]); on the base without the first after. Times are from after the after(A, ..) call until the test sees the value.

base 47efa2e 6c0066b
A's write, B not yet used 0.001 s 0.001 s
A's write while B is held under 1 ms 10.0 s
references to the buffer: before / job queued / after A's write (B's copy not done) 1 / 1 / 1 1 / 2 / 1

The test holds one reference itself, so nothing was freed early in it. That no other reference is left after KickoffX or Reset is from reading the code.

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: cargo test -p xcl --lib with that one test on both commits; RTX 3070, NVIDIA 621.24, Windows 11 Pro 26200, rustc 1.100.0 MSVC, debug.

Not tested: copy_memory_x / KickoffX end to end, an actual use after free, the whole suite, a retail title, whether a title's queue is held that long with such a copy in it.

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.

**@⁠CuteBooty** on GitHub · 2026-11-24 18:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7140153965) Two effects of keeping the upload buffers alive through `cpu_writes` (head `6c0066b`), when the queue of such a copy is held by a long wait. **1. XCL's last reference to the buffer can go before the copy has run.** The worker gives a job up after `WAIT_MS` (10 s from when it starts to wait for it) and drops the `KeepAlive` although the fence is not there. Until the list is reset, its state holds another reference. After `KickoffX` has returned (it takes `pending_uploads` out of the state) or after a `Reset` of the list, I found nothing else that does. The copy may then still be ahead on the GPU. **2. The copy can hold up other queues' CPU writes.** The worker is one thread and takes jobs one after the other, so `Immediate` / `ReadbackU64` jobs behind the copy's job wait with it, whichever queue they are for, up to 10 s for each such job. Lists with CPU writes already do that on `main`; this adds lists whose only job is the copy. (`main` skips these copies and queues nothing for them.) **Seen** with a scratch test in `cpu_writes.rs`: queue B waits for a fence and executes a list with a `CopyBufferRegion` from an upload buffer, then `after(B, [KeepAlive(buf)])` and `after(A, [Immediate(..)])`; on the base without the first `after`. Times are from after the `after(A, ..)` call until the test sees the value. | | base `47efa2e` | `6c0066b` | |---|---|---| | A's write, B not yet used | 0.001 s | 0.001 s | | A's write while B is held | under 1 ms | 10.0 s | | references to the buffer: before / job queued / after A's write (B's copy not done) | 1 / 1 / 1 | 1 / 2 / 1 | The test holds one reference itself, so nothing was freed early in it. That no other reference is left after `KickoffX` or `Reset` is from reading the code. 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:** `cargo test -p xcl --lib` with that one test on both commits; RTX 3070, NVIDIA 621.24, Windows 11 Pro 26200, rustc 1.100.0 MSVC, debug. **Not tested:** `copy_memory_x` / `KickoffX` end to end, an actual use after free, the whole suite, a retail title, whether a title's queue is held that long with such a copy in it. **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.
Author
Owner

@⁠philip-roy-jones on GitHub · 2026-11-24 16:24 UTC · original · edited 2026-11-24 18:35 UTC

@⁠crosettiremi, thanks for the 1,109-frame menu run on 70dfae4. Could you repeat that 60-second comparison on your RX 7900 XT using clean upstream main (c160d86 is the base of this revision) and the current #768 head f13de96?

On each clean checkout, build with cargo build --release --locked -p xcl and run .\scripts\smoke.ps1 -Game '<your local game folder>' -Seconds 60. Please use the same title, cache state, settings and menu inputs on both builds. Could you paste the two generated xcl-smoke blocks here? Those summaries are all we need.

Posted at Philip’s request via Codex (GPT-6.2 Astra, max reasoning effort).

**@⁠philip-roy-jones** on GitHub · 2026-11-24 16:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7137606181) · edited 2026-11-24 18:35 UTC @⁠crosettiremi, thanks for the 1,109-frame menu run on `70dfae4`. Could you repeat that 60-second comparison on your RX 7900 XT using clean upstream `main` (`c160d86` is the base of this revision) and the current #768 head `f13de96`? On each clean checkout, build with `cargo build --release --locked -p xcl` and run `.\scripts\smoke.ps1 -Game '<your local game folder>' -Seconds 60`. Please use the same title, cache state, settings and menu inputs on both builds. Could you paste the two generated `xcl-smoke` blocks here? Those summaries are all we need. Posted at Philip’s request via Codex (GPT-6.2 Astra, max reasoning effort).
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-24 19:07 UTC · original

Both points are fixed in f13de96 as far as my test shows. Same setup as before (queue B held by a fence, a copy from an upload buffer on it), now through copy_buffers_submitted(B, [list], [buf]):

6c0066b f13de96
A's CPU write while B is held 10.0 s under 1 ms
references to the buffer: before / submitted / B still held after that 1 / 2 / 1 (after 10 s) 1 / 2 / 2 (after 15 s)
gate open: the copy is done, the reference is let go – yes, after about 10 ms

Tested: that one scratch test and cargo test -p xcl --lib list_x on f13de96 (28 passed, 0 failed, staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes among them); RTX 3070, NVIDIA 621.24, Windows 11 Pro 26200, rustc 1.100.0 MSVC, debug.

Not tested: copy_memory_x / KickoffX end to end, the whole suite, a retail title.

AI use: Claude Code (Claude Opus 5.5) read the change, ran the tests and wrote this.

**@⁠CuteBooty** on GitHub · 2026-11-24 19:07 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7141636636) Both points are fixed in `f13de96` as far as my test shows. Same setup as before (queue B held by a fence, a copy from an upload buffer on it), now through `copy_buffers_submitted(B, [list], [buf])`: | | `6c0066b` | `f13de96` | |---|---|---| | A's CPU write while B is held | 10.0 s | under 1 ms | | references to the buffer: before / submitted / B still held after that | 1 / 2 / 1 (after 10 s) | 1 / 2 / 2 (after 15 s) | | gate open: the copy is done, the reference is let go | – | yes, after about 10 ms | **Tested:** that one scratch test and `cargo test -p xcl --lib list_x` on `f13de96` (28 passed, 0 failed, `staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes` among them); RTX 3070, NVIDIA 621.24, Windows 11 Pro 26200, rustc 1.100.0 MSVC, debug. **Not tested:** `copy_memory_x` / `KickoffX` end to end, the whole suite, a retail title. **AI use:** Claude Code (Claude Opus 5.5) read the change, ran the tests and wrote this.
Author
Owner

@⁠philip-roy-jones on GitHub · 2026-11-24 19:34 UTC · original

@⁠coolpersonnn, could you run one 60-second retail smoke test on your RTX 5090 using clean #768 head f13de96bcd3e505bac3684c2e24d9f7fc3a99b3d? Your clean main run on c160d86 recorded 1,670 frames in 60 seconds and gives us the comparison. Your baseline in #1439

Please use the same title, warm shader caches, default switch-window mode, settings and inputs as that run. On the clean head, build with cargo build --release --locked -p xcl and run .\scripts\smoke.ps1 -Game '<your local game folder>' -Seconds 60. Could you paste just the generated xcl-smoke block here? We can pair it with the main block you already posted.

Posted at Philip's request via Codex (GPT-6.2 Astra, max reasoning effort).

**@⁠philip-roy-jones** on GitHub · 2026-11-24 19:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7142286785) @⁠coolpersonnn, could you run one 60-second retail smoke test on your RTX 5090 using clean #768 head `f13de96bcd3e505bac3684c2e24d9f7fc3a99b3d`? Your clean `main` run on `c160d86` recorded 1,670 frames in 60 seconds and gives us the comparison. [Your baseline in #1439](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1439) Please use the same title, warm shader caches, default switch-window mode, settings and inputs as that run. On the clean head, build with `cargo build --release --locked -p xcl` and run `.\scripts\smoke.ps1 -Game '<your local game folder>' -Seconds 60`. Could you paste just the generated `xcl-smoke` block here? We can pair it with the main block you already posted. Posted at Philip's request via Codex (GPT-6.2 Astra, max reasoning effort).
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 02:59 UTC · original

Regression run of f13de96b on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: f13de96bcd3e505bac3684c2e24d9f7fc3a99b3d
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1631 (PresentX 1631)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14814 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

**@⁠Toons29** on GitHub · 2026-11-25 02:59 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7151467260) Regression run of `f13de96b` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: f13de96bcd3e505bac3684c2e24d9f7fc3a99b3d gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1631 (PresentX 1631) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14814 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 11:08 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 11:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7160656525) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:00 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 03:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7181308487) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Author
Owner

@⁠upipibi on GitHub · 2026-11-26 08:11 UTC · original

RTX 3070 run of head 953f9ee (base 08db802, not merged with main). As far as I can see this is the first run of the test title's console_list_methods on NVIDIA; the earlier 3070 report ran only the list_x lib tests on f13de96.

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. XCL_SAMPLE_* were unset.

  • cargo test --locked -p xcl --test e2e -- test_title --nocapture --test-threads=1, 3 runs: 3 passed, 0 failed each time (test_title_runs_and_game_folder_is_untouched and both debug-layer variants, about 575 s per run). Each run printed [PASS] D3D12.X: console command list memory methods (...) and failures: 0, and logged CopyMemoryToMemoryX from memory outside unified memory goes through an upload buffer (0x40 bytes) and same-window scratch copies recorded: 1. So the GPU-view copy path ran; it was not skipped. The title change has no skips or early returns.
  • Control: base 08db802 with only this PR's tests/testtitle/src/gpu.rs change applied (the runtime and e2e.rs are base's), same command, once: 3 failed. The title reported [FAIL] ... console command list memory methods ...: CopyMemoryToMemoryX from title heap, failures: 1, and the log had 0x... → 0x420012100 (0x40 bytes) is not in unified memory – not done and the same for the GPU view at 0xa60000000. The new check fails without the runtime change and passes with it.
  • cargo test --locked -p xcl --lib -- <name> --test-threads=1 --nocapture, 3 runs each, all passed: staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes (independent write 2.5 / 1.6 / 1.1 ms, upload refs 1/2/1, readback 0x1234abcd), copy_gpu_view_reads_each_mapping_and_leaves_holes_zero and copy_scratch_budget_counts_resources_until_gpu_completion.
  • cargo test --locked -p xcl --lib -- --skip hle::xaudio2 --test-threads=4 on head: 1297 passed, 0 failed, 27 ignored, no abort. 25 SKIPPED lines from 15 tests, none in hle::d3d12x: 21 no wave64 (hardware), 3 translator refusals of f16/f32 per-lane forms (#1426), and 1 PSO measurement that needs Windows Developer Mode.

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.

**@⁠upipibi** on GitHub · 2026-11-26 08:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7186295446) RTX 3070 run of head `953f9ee` (base `08db802`, not merged with main). As far as I can see this is the first run of the test title's `console_list_methods` on NVIDIA; the earlier 3070 report ran only the `list_x` lib tests on `f13de96`. 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. `XCL_SAMPLE_*` were unset. - `cargo test --locked -p xcl --test e2e -- test_title --nocapture --test-threads=1`, 3 runs: 3 passed, 0 failed each time (`test_title_runs_and_game_folder_is_untouched` and both debug-layer variants, about 575 s per run). Each run printed `[PASS] D3D12.X: console command list memory methods (...)` and `failures: 0`, and logged `CopyMemoryToMemoryX from memory outside unified memory goes through an upload buffer (0x40 bytes)` and `same-window scratch copies recorded: 1`. So the GPU-view copy path ran; it was not skipped. The title change has no skips or early returns. - Control: base `08db802` with only this PR's `tests/testtitle/src/gpu.rs` change applied (the runtime and `e2e.rs` are base's), same command, once: 3 failed. The title reported `[FAIL] ... console command list memory methods ...: CopyMemoryToMemoryX from title heap`, `failures: 1`, and the log had `0x... → 0x420012100 (0x40 bytes) is not in unified memory – not done` and the same for the GPU view at `0xa60000000`. The new check fails without the runtime change and passes with it. - `cargo test --locked -p xcl --lib -- <name> --test-threads=1 --nocapture`, 3 runs each, all passed: `staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes` (independent write 2.5 / 1.6 / 1.1 ms, upload refs 1/2/1, readback `0x1234abcd`), `copy_gpu_view_reads_each_mapping_and_leaves_holes_zero` and `copy_scratch_budget_counts_resources_until_gpu_completion`. - `cargo test --locked -p xcl --lib -- --skip hle::xaudio2 --test-threads=4` on head: 1297 passed, 0 failed, 27 ignored, no abort. 25 SKIPPED lines from 15 tests, none in `hle::d3d12x`: 21 no wave64 (hardware), 3 translator refusals of f16/f32 per-lane forms (#1426), and 1 PSO measurement that needs Windows Developer Mode. 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.
Author
Owner

@⁠oni-swr on GitHub · 2026-11-26 08:56 UTC · original

AMD RX 7800 XT test report for #768 at exact head 953f9ee0ce38eabc12bb21b1c29fa95b14ad287f, on the bundled synthetic title only. No retail smoke, game files, dumps, shader names or retail hashes were used.

Setup

  • AMD Radeon RX 7800 XT (16176 MiB), driver 32.0.31035.1003, AMD Ryzen 7 5700X3D 8-Core Processor, Windows 11 10.0.26200, rustc/cargo 1.100.0 MSVC, debug builds, cargo --locked -j 4. The physical RX 7800 XT was confirmed in the runtime log (backend 'real' - AMD Radeon RX 7800 XT) and no other process was using it when the runs started.
  • Clean detached trees, each with its own target directory under D:\xcl-768-amd-win-target: base 08db8020d323bf478964fcc586152cce54959cfc, parent fb84553ef55b044f401dae5101c5ab11dfc87ca2 (the PR without its top commit), head 953f9ee0ce38eabc12bb21b1c29fa95b14ad287f. For every run I checked that xcl.exe / xcl_testtitle.exe / testgame_mw.dll were built from that run's own tree (their .d files name only that source tree).
  • XCL_SAMPLE_* unset.

Workspace suite, cargo test --workspace --locked --no-fail-fast -j 4 -- --test-threads=4

tree passed failed ignored SKIPPED lines
base 08db802 1428 1 47 7
head 953f9ee 1430 1 47 7

The one failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (fuzz_tests.rs:1171, seed 722: res[30] = 0x1, CPU 0x7fffffff). It failed in the same way on both base and head, so it is not caused by this PR. The head run has two more passing lib tests than base (1305 vs 1303), which are the two new unit tests. The 7 skip notices are the same on both trees: 6 translator refusals of f16/f32 per-lane forms (#1426) and 1 heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows. The title tests were not skipped (no SKIPPED the title notice).

Backing-page copy, both submission paths (console_list_methods, cargo test --locked -p xcl --test e2e -- test_title --nocapture --test-threads=1)

  • head: 3 passed, 0 failed (the plain run and both debug-layer variants). Each printed [PASS] D3D12.X: console command list memory methods ..., failures: 0, CopyMemoryToMemoryX same-window scratch copies recorded: 1 and CopyMemoryToMemoryX from memory outside unified memory goes through an upload buffer (0x40 bytes). Runs took about 11 s here.
  • parent fb84553: the same 3 passed, so the top commit does not change this result.
  • Control: base with only this PR's tests/testtitle/src/gpu.rs copied in (so the runtime and e2e.rs are base's): 3 failed, [FAIL] ... CopyMemoryToMemoryX from title heap, failures: 1, with ... is not in unified memory - not done for both the title-heap source and the GPU-view source 0xa60000000. The new check fails without the runtime change and passes with it. (My first attempt at this control did not rebuild, because the copied file kept its old mtime and cargo reused the earlier exe; I touched the file, rebuilt, and report only the rebuilt run.)

Queue retirement controls, head, cargo test --locked -p xcl --lib -- <3 names> --nocapture --test-threads=1, run 3 times: 3 passed each time (staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes: independent CPU write 1.1 / 1.3 / 1.6 ms, upload refs 1/2/1, readback 0x1234abcd; copy_gpu_view_reads_each_mapping_and_leaves_holes_zero; copy_scratch_budget_counts_resources_until_gpu_completion). The staged-copy test and the scratch-budget test in this form do not exist on the parent, so no parent control was run for them. list_x:: and title_textures:: on the parent: 60 passed, 0 failed.

Not tested: the retail title and smoke runs (not allowed here), a release build, a merge with current main, NVIDIA, a long-held queue wait beyond what the unit tests cover.

AI use: Claude Code (Claude Sonnet 5.5) ran the builds and tests and wrote this report; coordinated by Codex (gpt-6.2-sol).

**@⁠oni-swr** on GitHub · 2026-11-26 08:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/768#issuecomment-7187217056) AMD RX 7800 XT test report for #768 at exact head `953f9ee0ce38eabc12bb21b1c29fa95b14ad287f`, on the bundled synthetic title only. No retail smoke, game files, dumps, shader names or retail hashes were used. **Setup** - AMD Radeon RX 7800 XT (16176 MiB), driver 32.0.31035.1003, AMD Ryzen 7 5700X3D 8-Core Processor, Windows 11 10.0.26200, rustc/cargo 1.100.0 MSVC, debug builds, `cargo --locked -j 4`. The physical RX 7800 XT was confirmed in the runtime log (`backend 'real' - AMD Radeon RX 7800 XT`) and no other process was using it when the runs started. - Clean detached trees, each with its own target directory under `D:\xcl-768-amd-win-target`: base `08db8020d323bf478964fcc586152cce54959cfc`, parent `fb84553ef55b044f401dae5101c5ab11dfc87ca2` (the PR without its top commit), head `953f9ee0ce38eabc12bb21b1c29fa95b14ad287f`. For every run I checked that `xcl.exe` / `xcl_testtitle.exe` / `testgame_mw.dll` were built from that run's own tree (their `.d` files name only that source tree). - `XCL_SAMPLE_*` unset. **Workspace suite**, `cargo test --workspace --locked --no-fail-fast -j 4 -- --test-threads=4` | tree | passed | failed | ignored | SKIPPED lines | |---|---|---|---|---| | base `08db802` | 1428 | 1 | 47 | 7 | | head `953f9ee` | 1430 | 1 | 47 | 7 | The one failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (`fuzz_tests.rs:1171`, seed 722: `res[30] = 0x1, CPU 0x7fffffff`). It failed in the same way on both base and head, so it is not caused by this PR. The head run has two more passing lib tests than base (1305 vs 1303), which are the two new unit tests. The 7 skip notices are the same on both trees: 6 translator refusals of f16/f32 per-lane forms (#1426) and 1 `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`. The title tests were not skipped (no `SKIPPED the title` notice). **Backing-page copy, both submission paths** (`console_list_methods`, `cargo test --locked -p xcl --test e2e -- test_title --nocapture --test-threads=1`) - head: 3 passed, 0 failed (the plain run and both debug-layer variants). Each printed `[PASS] D3D12.X: console command list memory methods ...`, `failures: 0`, `CopyMemoryToMemoryX same-window scratch copies recorded: 1` and `CopyMemoryToMemoryX from memory outside unified memory goes through an upload buffer (0x40 bytes)`. Runs took about 11 s here. - parent `fb84553`: the same 3 passed, so the top commit does not change this result. - Control: base with only this PR's `tests/testtitle/src/gpu.rs` copied in (so the runtime and `e2e.rs` are base's): 3 failed, `[FAIL] ... CopyMemoryToMemoryX from title heap`, `failures: 1`, with `... is not in unified memory - not done` for both the title-heap source and the GPU-view source `0xa60000000`. The new check fails without the runtime change and passes with it. (My first attempt at this control did not rebuild, because the copied file kept its old mtime and cargo reused the earlier exe; I touched the file, rebuilt, and report only the rebuilt run.) **Queue retirement controls**, head, `cargo test --locked -p xcl --lib -- <3 names> --nocapture --test-threads=1`, run 3 times: 3 passed each time (`staged_copy_waits_for_its_own_queue_without_blocking_cpu_writes`: independent CPU write 1.1 / 1.3 / 1.6 ms, upload refs 1/2/1, readback `0x1234abcd`; `copy_gpu_view_reads_each_mapping_and_leaves_holes_zero`; `copy_scratch_budget_counts_resources_until_gpu_completion`). The staged-copy test and the scratch-budget test in this form do not exist on the parent, so no parent control was run for them. `list_x::` and `title_textures::` on the parent: 60 passed, 0 failed. **Not tested:** the retail title and smoke runs (not allowed here), a release build, a merge with current `main`, NVIDIA, a long-held queue wait beyond what the unit tests cover. AI use: Claude Code (Claude Sonnet 5.5) ran the builds and tests and wrote this report; coordinated by Codex (gpt-6.2-sol).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/768/head:github-bot/gh-768'
git switch 'github-bot/gh-768'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-768'
git switch 'github-bot/gh-768'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-768'
git switch 'github-bot/gh-768'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-768'
git switch 'main'
git merge --squash 'github-bot/gh-768'
git switch 'main'
git merge --ff-only 'github-bot/gh-768'
git switch 'main'
git merge 'github-bot/gh-768'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.