D3D12.X: unmap a superseded texture only once the work before it is done #2270

Open
github-bot wants to merge 1 commit from github-bot/gh-2270 into main AGit
Owner

@⁠joeypercia on GitHub · 2026-11-25 11:55 UTC · original
joeypercia:d3d12x-held-unmaps → main · +184 −13 · 1 files · 1 commits · open

vram::unmap_superseded NULL-maps a placed texture's tiles on the tile-mapping queue the moment a newer placement covers it. Nothing orders that against work already submitted that copies to or samples the texture. Changing a reserved texture's mappings under a copy that's running removes the device on at least one NVIDIA Blackwell card. With the probe, which copies on one queue while the mapping flips to NULL on another:

  • RTX 5070 (driver 610.88): 0x887A0006 after 1.8 s (Dezmonius).
  • RTX 3070 (616.56): all 20 rounds finish (upipibi).
  • RTX 4070 Ti (621.40): all 20 rounds finish.

Title runs on #2057 on an RTX 5080 and an RTX 3080 Ti end in a DRED page fault on a live texture inside a run of CopyTextureRegions (kanade333, dhillonjagdeep650-boop). This race is a cause that fits; whether it's the cause of those runs is not shown yet.

Update: on an RTX 5080 (driver 621.40), @⁠kanade333 ran #2057 with and without this PR, two runs each. One run with it was still removed by the same fault (0x887a0006, DRED page fault at VA 0x0 inside a run of CopyTextureRegions), and one without it reached the 420 s limit. So this race isn't, or isn't the only, cause of that in-world fault, and the probe passes on that card with that driver. What this PR fixes is the race the probe shows on the RTX 5070.

Now unmap_superseded puts a mark (a fence signal) on every queue the title submitted to and on XCL's upload queues. The unmap, with the return of the texture's tiles to the pool, waits in a list until the CPU sees every mark done. before_execute makes the ones that are. The mapping queue never waits for a title queue. That is the cycle found in #594: a title queue waiting for work submitted later on another queue, which waits behind the mapping queue. The design is @⁠upipibi's from #594 and the variant @⁠Ali-AbdulHadii ran there. #594 itself (@⁠Abdellah-Khanani) waits on the GPU and conflicts with main now. This PR replaces that approach, and I'm happy to close it in favour of an update of #594 if its authors prefer.

Part of #1773. Related: #475, #594.

What is in it (crates/xcl/src/hle/d3d12x/vram.rs, one commit)

  • Pages::mark (a reusable fence per queue), HeldUnmap and Pages::release_held. unmap_superseded holds the unmap. If a mark can't be made, the texture stays mapped, as before any unmap.
  • before_execute makes the held unmaps whose marks are done. Their textures are let go of after PAGES is unlocked, because the last reference's release comes back to forget_pages.
  • remap_if_unmapped drops a held unmap: the texture never lost its tiles.
  • GPU test a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done. A title queue's submitted work is held behind a fence. The superseded texture keeps its tiles until that work is done and gets no NULL mapping before then, then the tiles go back. A texture mapped again before its unmap keeps its tiles, and its unmap is dropped. With the unmap made at once (as on main), the test fails at "no unmap yet".

Tested

  • NVIDIA GeForce RTX 4070 Ti (Ada), driver 621.40, and the AMD Radeon iGPU of a Ryzen 7 7800X3D (RDNA2) with XCL_ADAPTER=Radeon; Windows 11 Pro 26200; Rust 1.100.0 MSVC; DXC 1.8.2502.11; debug for the tests, release for the runs.
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on b7f6b76:
    • RTX 4070 Ti: 1251 passed, 0 failed, 46 ignored.
    • RDNA2: 1250 passed, 1 failed, 46 ignored. The failure is gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, which fails the same way on main 1a0bbe3 on this iGPU (#2115).
    • Correction: the new test, like d32s8_targets_take_their_own_size_of_video_memory, creates its device on EnumAdapters1(0) and ignores XCL_ADAPTER, as @⁠luckyteagirl and @⁠GustavoEllwanger found. So in the "RDNA2" run it ran on the RTX 4070 Ti again. It has not run on AMD here. @⁠oni-swr ran it on an RX 7800 XT (RDNA3) machine.
    • SKIPPED: RTX 4070 Ti: the wave64 cases of the lower / lower_dxil GPU tests, gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64). RDNA2: the mesh-shader tests. Both: heap_window_out_of_memory_falls_back_to_the_switch_form, pso_measurement_compiles_an_exact_synthetic_record (no Developer Mode), test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state, and the lower_dxil f16 / f32 cases the direct backend refuses.

Regression run

RTX 4070 Ti (driver 621.40), release builds, 60 s each, scripts/smoke.ps1 -Game <folder> -Title retail-title on the newer retail title, one after the other from the same shell with the same settings. main 1a0bbe3 (this PR's base) and this PR's head (no uncommitted changes):

main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 4070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1537 (PresentX 1538)
presents per 2 s (last 3): 60 60 52
device removals: 0
crashes: 0
peak commit: 16109 MB

PR:

xcl-smoke v1
commit: b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0
gpu: NVIDIA GeForce RTX 4070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1586 (PresentX 1587)
presents per 2 s (last 3): 60 60 51
device removals: 0
crashes: 0
peak commit: 16445 MB

Not tested

  • On a GPU where the race removes the device (the RTX 5070 / 5080 above). I don't have one. The fix is checked by the GPU test, not by a run that used to fail. A test of this branch on one of those cards, in the title or with the probe's r_null_during_copyq turned into XCL calls, would settle it.
  • Work submitted after the texture was superseded that still uses it. The marks only cover work submitted before. XCL's own uploads into a superseded texture stop at that point (title_textures shadows it).
  • AMD in the title. The new test on this machine's RDNA2 iGPU (see the correction above).

AI use

  • Claude Code with Claude Opus 5.5: wrote the probe, the fix, the test and this description, and ran the tests and the runs on the hardware above. The design follows the #594 thread, as credited above.
**@⁠joeypercia** on GitHub · 2026-11-25 11:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270) `joeypercia:d3d12x-held-unmaps` → `main` · +184 −13 · 1 files · 1 commits · open `vram::unmap_superseded` NULL-maps a placed texture's tiles on the tile-mapping queue the moment a newer placement covers it. Nothing orders that against work already submitted that copies to or samples the texture. Changing a reserved texture's mappings under a copy that's running removes the device on at least one NVIDIA Blackwell card. With the [probe](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057), which copies on one queue while the mapping flips to NULL on another: - RTX 5070 (driver 610.88): `0x887A0006` after 1.8 s ([Dezmonius](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057)). - RTX 3070 (616.56): all 20 rounds finish ([upipibi](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057)). - RTX 4070 Ti (621.40): all 20 rounds finish. Title runs on #2057 on an RTX 5080 and an RTX 3080 Ti end in a DRED page fault on a live texture inside a run of `CopyTextureRegion`s ([kanade333](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057), [dhillonjagdeep650-boop](https://git.gtahub.st/github/xcl-dev--xcl/issues/1773)). This race is a cause that fits; whether it's the cause of those runs is not shown yet. **Update:** on an RTX 5080 (driver 621.40), [@⁠kanade333](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2270) ran #2057 with and without this PR, two runs each. One run with it was still removed by the same fault (`0x887a0006`, DRED page fault at VA `0x0` inside a run of `CopyTextureRegion`s), and one without it reached the 420 s limit. So this race isn't, or isn't the only, cause of that in-world fault, and the probe passes on that card with that driver. What this PR fixes is the race the probe shows on the RTX 5070. Now `unmap_superseded` puts a mark (a fence signal) on every queue the title submitted to and on XCL's upload queues. The unmap, with the return of the texture's tiles to the pool, waits in a list until the CPU sees every mark done. `before_execute` makes the ones that are. The mapping queue never waits for a title queue. That is the cycle found in #594: a title queue waiting for work submitted later on another queue, which waits behind the mapping queue. The design is @⁠upipibi's from #594 and the variant @⁠Ali-AbdulHadii ran there. #594 itself (@⁠Abdellah-Khanani) waits on the GPU and conflicts with `main` now. This PR replaces that approach, and I'm happy to close it in favour of an update of #594 if its authors prefer. Part of #1773. Related: #475, #594. **What is in it** (`crates/xcl/src/hle/d3d12x/vram.rs`, one commit) - `Pages::mark` (a reusable fence per queue), `HeldUnmap` and `Pages::release_held`. `unmap_superseded` holds the unmap. If a mark can't be made, the texture stays mapped, as before any unmap. - `before_execute` makes the held unmaps whose marks are done. Their textures are let go of after `PAGES` is unlocked, because the last reference's release comes back to `forget_pages`. - `remap_if_unmapped` drops a held unmap: the texture never lost its tiles. - GPU test `a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done`. A title queue's submitted work is held behind a fence. The superseded texture keeps its tiles until that work is done and gets no NULL mapping before then, then the tiles go back. A texture mapped again before its unmap keeps its tiles, and its unmap is dropped. With the unmap made at once (as on `main`), the test fails at "no unmap yet". **Tested** - NVIDIA GeForce RTX 4070 Ti (Ada), driver 621.40, and the AMD Radeon iGPU of a Ryzen 7 7800X3D (RDNA2) with `XCL_ADAPTER=Radeon`; Windows 11 Pro 26200; Rust 1.100.0 MSVC; DXC 1.8.2502.11; debug for the tests, release for the runs. - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on `b7f6b76`: - RTX 4070 Ti: **1251 passed, 0 failed, 46 ignored**. - RDNA2: **1250 passed, 1 failed, 46 ignored**. The failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, which fails the same way on `main` `1a0bbe3` on this iGPU (#2115). - **Correction:** the new test, like `d32s8_targets_take_their_own_size_of_video_memory`, creates its device on `EnumAdapters1(0)` and ignores `XCL_ADAPTER`, as @⁠luckyteagirl and @⁠GustavoEllwanger found. So in the "RDNA2" run it ran on the RTX 4070 Ti again. It has not run on AMD here. @⁠oni-swr ran it on an RX 7800 XT (RDNA3) machine. - `SKIPPED`: RTX 4070 Ti: the wave64 cases of the `lower` / `lower_dxil` GPU tests, `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64). RDNA2: the mesh-shader tests. Both: `heap_window_out_of_memory_falls_back_to_the_switch_form`, `pso_measurement_compiles_an_exact_synthetic_record` (no Developer Mode), `test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state`, and the `lower_dxil` f16 / f32 cases the direct backend refuses. **Regression run** RTX 4070 Ti (driver 621.40), release builds, 60 s each, `scripts/smoke.ps1 -Game <folder> -Title retail-title` on the newer retail title, one after the other from the same shell with the same settings. `main` `1a0bbe3` (this PR's base) and this PR's head (no uncommitted changes): main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: NVIDIA GeForce RTX 4070 Ti title: retail-title seconds: 60 exit: 0x0 frames shown: 1537 (PresentX 1538) presents per 2 s (last 3): 60 60 52 device removals: 0 crashes: 0 peak commit: 16109 MB ``` PR: ``` xcl-smoke v1 commit: b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0 gpu: NVIDIA GeForce RTX 4070 Ti title: retail-title seconds: 60 exit: 0x0 frames shown: 1586 (PresentX 1587) presents per 2 s (last 3): 60 60 51 device removals: 0 crashes: 0 peak commit: 16445 MB ``` **Not tested** - On a GPU where the race removes the device (the RTX 5070 / 5080 above). I don't have one. The fix is checked by the GPU test, not by a run that used to fail. A test of this branch on one of those cards, in the title or with the probe's `r_null_during_copyq` turned into XCL calls, would settle it. - Work submitted after the texture was superseded that still uses it. The marks only cover work submitted before. XCL's own uploads into a superseded texture stop at that point (`title_textures` shadows it). - AMD in the title. The new test on this machine's RDNA2 iGPU (see the correction above). **AI use** - Claude Code with Claude Opus 5.5: wrote the probe, the fix, the test and this description, and ran the tests and the runs on the hardware above. The design follows the #594 thread, as credited above.
`unmap_superseded` NULL-mapped a placed texture's tiles on the tile-mapping
queue the moment a newer placement covered it, with nothing ordering that
against work already submitted that copies to or samples the texture. On
NVIDIA Ampere and Blackwell GPUs a reserved texture whose tiles go NULL
while a copy into it runs removes the device: the synthetic probe on #2057
(copies on one queue, the mapping flipped to NULL on another) gives
0x887a0006 on an RTX 5070 after 1.8 s, and passes on an RTX 4070 Ti (Ada).
Title runs on #2057 on those GPUs end in a DRED page fault inside a run of
CopyTextureRegion on a live texture.

A mark (a fence signal) now goes on every title queue and upload queue, and
the unmap, with the return of the texture's tiles, waits in a list until
the CPU sees every mark done; `before_execute` makes the ones that are.
The mapping queue never waits for a title queue, so the cycle found in
#594 (a title queue waiting for work submitted later, behind the mapping
queue) can't form. The design is upipibi's and Ali-AbdulHadii's from #594.
A texture mapped again before its unmap is made keeps its tiles.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:25:08 +00:00
Author
Owner

@⁠kanade333 on GitHub · 2026-11-25 13:12 UTC · original

RTX 5080 16 GB (Blackwell), driver 621.40: two runs with this PR and two without, on #2057's head. One of each was removed and one of each ran to the 420 s limit, so on this card these runs show no difference either way. The probe passes all 13 cases here.

@⁠joeypercia, thanks for the probe and the fix. Numbers below.

Setup: NVIDIA GeForce RTX 5080 16 GB (driver 621.40), AMD Ryzen 9 9950X, 32 GB RAM, Windows 11 Pro 26200, release. Retail title of #505, 1.0.2.1, XCL_NETWORK=0, scripted A presses.

Trees

  • "without": #2057 at 4df1e6e, unchanged.
  • "with": 4df1e6e + this PR's commit b7f6b76. It applies with one conflict in vram::before_execute, where main has since added the heap reclaim of 5a515f0. I kept 4df1e6e's body and added only this PR's part: release_held(now) under PAGES, and the released textures dropped after the lock. cargo test --release -p xcl --lib -- d3d12x::vram --test-threads=4 on it: 12 passed, 0 failed, 1 ignored.

Probe (b39608e, release, one process per case, before the title runs): all 13 complete with no removal. The 10 fixed-mapping cases read every mapped word right and zeros from NULL tiles. The three concurrent cases finish their 20 rounds in 0.4 s (r_null_during_copyq, 1,258 remaps), 0.1 s (r_null_during_direct, 252) and 0.4 s (r_other_tiles_during_copyq, 820). The copies end so fast on this card that the remaps have little time to land in the middle of one, so this does not show the race is harmless here.

Title runs, all with XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_COHERENT_MB=512 XCL_LOOK_SKIP=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_RUN_SECONDS=420, warm caches (all 2,689 compute pipelines built ahead with this driver), one after the other:

run tree presents after 62 s end
33 without 241 0x887a0006 at 379.3 s
34 with 1,295 ran to 420 s
35 with 0 (removed before the world) 0x887a0006 at 55.6 s
36 without 2,285 ran to 420 s
  • All three removals: DRED page fault at GPU VA 0x0; allocations there: []; recently freed: [], with the list in flight inside a run of CopyTextureRegion (breadcrumbs 8 8 8 >8 8 8; 6 of 19 and 15 of 39 operations done). On driver 610.88 this morning the same tree's two DRED runs faulted at an address inside a live resource instead (my comment on #2057), also in CopyTextureRegions.
  • 0 GPU-wait time-outs, 0 watchdog releases, 0 failed DirectStorage requests in all four.
  • Local video memory peaked at 17.2–20.3 GB.
  • Runs 34 and 36 both have long stretches with no present and no submit (from about 235 s on in 34; 240–330 s in 36, which then picked up again). In the thread dump at 250 s in 36, the title's worker threads sit in waits called from its own code (+0x221c3c2); I have not looked further.

I could not tell from the log whether an unmap was actually held in runs 34 and 35: nothing logs it.

Not tested: more than two runs per tree; this PR on main; another Blackwell card; whether an unmap was held.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran the probe and the title on this machine, and wrote this report.

**@⁠kanade333** on GitHub · 2026-11-25 13:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7163435608) **RTX 5080 16 GB (Blackwell), driver 621.40: two runs with this PR and two without, on #2057's head. One of each was removed and one of each ran to the 420 s limit, so on this card these runs show no difference either way. The probe passes all 13 cases here.** @⁠joeypercia, thanks for the probe and the fix. Numbers below. **Setup:** NVIDIA GeForce RTX 5080 16 GB (driver 621.40), AMD Ryzen 9 9950X, 32 GB RAM, Windows 11 Pro 26200, release. Retail title of #505, 1.0.2.1, `XCL_NETWORK=0`, scripted A presses. **Trees** - "without": #2057 at `4df1e6e`, unchanged. - "with": `4df1e6e` + this PR's commit `b7f6b76`. It applies with one conflict in `vram::before_execute`, where `main` has since added the heap reclaim of `5a515f0`. I kept `4df1e6e`'s body and added only this PR's part: `release_held(now)` under `PAGES`, and the released textures dropped after the lock. `cargo test --release -p xcl --lib -- d3d12x::vram --test-threads=4` on it: 12 passed, 0 failed, 1 ignored. **Probe** (`b39608e`, release, one process per case, before the title runs): all 13 complete with no removal. The 10 fixed-mapping cases read every mapped word right and zeros from NULL tiles. The three concurrent cases finish their 20 rounds in 0.4 s (`r_null_during_copyq`, 1,258 remaps), 0.1 s (`r_null_during_direct`, 252) and 0.4 s (`r_other_tiles_during_copyq`, 820). The copies end so fast on this card that the remaps have little time to land in the middle of one, so this does not show the race is harmless here. **Title runs**, all with `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_COHERENT_HEAPS=sparse:16 XCL_COHERENT_MB=512 XCL_LOOK_SKIP=1 XCL_WATCH_HOT=0 XCL_DRED=1 XCL_RUN_SECONDS=420`, warm caches (all 2,689 compute pipelines built ahead with this driver), one after the other: | run | tree | presents after 62 s | end | |---|---|---|---| | 33 | without | 241 | `0x887a0006` at 379.3 s | | 34 | with | 1,295 | ran to 420 s | | 35 | with | 0 (removed before the world) | `0x887a0006` at 55.6 s | | 36 | without | 2,285 | ran to 420 s | - All three removals: `DRED page fault at GPU VA 0x0; allocations there: []; recently freed: []`, with the list in flight inside a run of `CopyTextureRegion` (breadcrumbs `8 8 8 >8 8 8`; 6 of 19 and 15 of 39 operations done). On driver 610.88 this morning the same tree's two DRED runs faulted at an address inside a live resource instead (my comment on #2057), also in `CopyTextureRegion`s. - 0 GPU-wait time-outs, 0 watchdog releases, 0 failed DirectStorage requests in all four. - Local video memory peaked at 17.2–20.3 GB. - Runs 34 and 36 both have long stretches with no present and no submit (from about 235 s on in 34; 240–330 s in 36, which then picked up again). In the thread dump at 250 s in 36, the title's worker threads sit in waits called from its own code (`+0x221c3c2`); I have not looked further. I could not tell from the log whether an unmap was actually held in runs 34 and 35: nothing logs it. **Not tested:** more than two runs per tree; this PR on `main`; another Blackwell card; whether an unmap was held. **AI use:** Claude Code (Claude Opus 5.5) built the trees, ran the probe and the title on this machine, and wrote this report.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 13:12 UTC · original

Independent Windows verification of exact PR head b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0, with a paired owned-title smoke run against its base, main 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6.

Environment: Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver 30.0.13002.13003; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. Isolated Cargo targets; clean PR worktree. No game files were copied or attached.

GPU regression test: XCL_ADAPTER=6800M XCL_REQUIRE_GPU=1 XCL_DIRECT_DXIL=1 cargo test --locked -p xcl --lib -j 2 a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored. The test emitted D3D12 device/queue/resource and sparse-VRAM setup logs, then completed the held-unmap assertions. This fixture calls EnumAdapters1(0) directly, so XCL_ADAPTER does not select its GPU; I did not verify the name of adapter 0. The result is a hardware-adapter test result, not a confirmed RX 6800M result.

Release and title regression run: cargo build --locked --workspace --release -j 2 passed on the clean PR head. I ran scripts/smoke.ps1 through a process and memory guard for 12 seconds per revision, with the same owned title and XCL_ADAPTER=6800M, default translation mode, and separate fresh data/cache directories. Neither run hit the guard.

Main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 12
exit: 0x0
frames shown: 111 (PresentX 111)
presents per 2 s (last 3): 1 50 60
device removals: 0
crashes: 0
peak commit: 8162 MB

PR head:

xcl-smoke v1
commit: b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0
gpu: AMD Radeon RX 6800M
title: 2ef5fd64
seconds: 12
exit: 0x0
frames shown: 113 (PresentX 113)
presents per 2 s (last 3): 0 53 60
device removals: 0
crashes: 0
peak commit: 8230 MB

Limits: These brief startup runs do not establish whether the title exercised the superseded-texture unmap path, and frame counts are not a performance comparison. I did not run the full workspace suite on this PR head; the author reports it separately. The focused fixture's exact GPU identity remains unverified because it hard-codes DXGI adapter 0.

AI use: OpenAI Codex (GPT-6; exact variant not exposed in this session) ran the native Windows test and release build, monitored the paired title runs, checked the clean exact head, and drafted this report. No game data was uploaded.

**@⁠luckyteagirl** on GitHub · 2026-11-25 13:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7163446721) Independent Windows verification of exact PR head `b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0`, with a paired owned-title smoke run against its base, main `1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6`. **Environment:** Windows 11 build 26200; Ryzen 9 5980HX; Radeon RX 6800M driver `30.0.13002.13003`; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. Isolated Cargo targets; clean PR worktree. No game files were copied or attached. **GPU regression test:** `XCL_ADAPTER=6800M XCL_REQUIRE_GPU=1 XCL_DIRECT_DXIL=1 cargo test --locked -p xcl --lib -j 2 a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done -- --test-threads=1 --show-output`: **1 passed, 0 failed, 0 ignored**. The test emitted D3D12 device/queue/resource and sparse-VRAM setup logs, then completed the held-unmap assertions. This fixture calls `EnumAdapters1(0)` directly, so `XCL_ADAPTER` does not select its GPU; I did not verify the name of adapter 0. The result is a hardware-adapter test result, not a confirmed RX 6800M result. **Release and title regression run:** `cargo build --locked --workspace --release -j 2` passed on the clean PR head. I ran `scripts/smoke.ps1` through a process and memory guard for 12 seconds per revision, with the same owned title and `XCL_ADAPTER=6800M`, default translation mode, and separate fresh data/cache directories. Neither run hit the guard. Main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 12 exit: 0x0 frames shown: 111 (PresentX 111) presents per 2 s (last 3): 1 50 60 device removals: 0 crashes: 0 peak commit: 8162 MB ``` PR head: ``` xcl-smoke v1 commit: b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0 gpu: AMD Radeon RX 6800M title: 2ef5fd64 seconds: 12 exit: 0x0 frames shown: 113 (PresentX 113) presents per 2 s (last 3): 0 53 60 device removals: 0 crashes: 0 peak commit: 8230 MB ``` **Limits:** These brief startup runs do not establish whether the title exercised the superseded-texture unmap path, and frame counts are not a performance comparison. I did not run the full workspace suite on this PR head; the author reports it separately. The focused fixture's exact GPU identity remains unverified because it hard-codes DXGI adapter 0. **AI use:** OpenAI Codex (GPT-6; exact variant not exposed in this session) ran the native Windows test and release build, monitored the paired title runs, checked the clean exact head, and drafted this report. No game data was uploaded.
Author
Owner

@⁠joeypercia on GitHub · 2026-11-25 13:12 UTC · original

@⁠kanade333 thanks, that's the result that was missing. Run 35 shows the in-world copy fault still happens with this PR, so this race isn't, or isn't the only, cause of it. I've added your runs to the description and narrowed what the PR claims to the race the probe shows on the RTX 5070.

A held unmap isn't logged, as you found. A count of held and released unmaps under XCL_ACTIVITY=1 would answer that. I'll add it as its own diagnostic PR rather than here, so this one's smoke runs stay valid.

AI use: Claude Code (Claude Opus 5.5) wrote this reply.

**@⁠joeypercia** on GitHub · 2026-11-25 13:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7163453100) @⁠kanade333 thanks, that's the result that was missing. Run 35 shows the in-world copy fault still happens with this PR, so this race isn't, or isn't the only, cause of it. I've added your runs to the description and narrowed what the PR claims to the race the probe shows on the RTX 5070. A held unmap isn't logged, as you found. A count of held and released unmaps under `XCL_ACTIVITY=1` would answer that. I'll add it as its own diagnostic PR rather than here, so this one's smoke runs stay valid. AI use: Claude Code (Claude Opus 5.5) wrote this reply.
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 13:19 UTC · original

AMD RDNA3 (native wave64) test report for exact head b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0, as pushed (not merged onto current main).

Tested

  • AMD Radeon RX 7800 XT (RDNA3, native wave64), driver 32.0.31035.1003; Windows 11 Pro 10.0.26200; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); debug; DXC 1.9.0.5512 (dxcompiler.dll)
  • cargo build --workspace: ok
  • Targeted: a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done: 1 passed; vram filter: 18 passed, 0 failed, 1 ignored
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1250 passed, 1 failed, 46 ignored (summed over all test binaries)
  • SKIPPED: 7 lines in the full run (6 `lower_dxil` f16/f32 per-lane-form cases "refused (unsupported V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 ... #1426 semantics)", plus `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`). The one failure is `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722: res[30] = 0x1, CPU 0x7fffffff). It is not in code this PR touches, and I reproduced the same failure and seed on `main` at `1a0bbe3` with `cargo test -p xcl --lib fuzz_validate_and_gpu_1`, so it is pre-existing on RDNA3, not caused by this PR.

Not tested

  • No game title, no scripts/smoke.ps1 regression run (synthetic GPU/unit tests only)
  • Not merged onto current main; other GPUs (NVIDIA / Intel / RDNA2 / RDNA4)
  • Whether the new test fails without the fix (I did not revert it)

AI use: Claude Code (Claude Sonnet 5.5) ran the build and tests and wrote this report; the numbers are from the runs above.

**@⁠oni-swr** on GitHub · 2026-11-25 13:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7163604121) AMD RDNA3 (native wave64) test report for exact head `b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0`, as pushed (not merged onto current `main`). **Tested** - AMD Radeon RX 7800 XT (RDNA3, native wave64), driver 32.0.31035.1003; Windows 11 Pro 10.0.26200; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); debug; DXC 1.9.0.5512 (dxcompiler.dll) - `cargo build --workspace`: ok - Targeted: `a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done`: 1 passed; `vram` filter: 18 passed, 0 failed, 1 ignored - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1250 passed, 1 failed, 46 ignored (summed over all test binaries) - SKIPPED: 7 lines in the full run (6 \`lower_dxil\` f16/f32 per-lane-form cases "refused (unsupported V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 ... #1426 semantics)", plus \`heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows\`). The one failure is \`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1\` (seed 722: res[30] = 0x1, CPU 0x7fffffff). It is not in code this PR touches, and I reproduced the same failure and seed on \`main\` at \`1a0bbe3\` with \`cargo test -p xcl --lib fuzz_validate_and_gpu_1\`, so it is pre-existing on RDNA3, not caused by this PR. **Not tested** - No game title, no `scripts/smoke.ps1` regression run (synthetic GPU/unit tests only) - Not merged onto current `main`; other GPUs (NVIDIA / Intel / RDNA2 / RDNA4) - Whether the new test fails without the fix (I did not revert it) **AI use**: Claude Code (Claude Sonnet 5.5) ran the build and tests and wrote this report; the numbers are from the runs above.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 17:05 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 17:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7168978625) 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

@⁠GustavoEllwanger on GitHub · 2026-11-25 13:13 UTC · original · edited 2026-11-25 17:53 UTC

Independent dual-GPU Windows verification on exact PR head b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0 (parent 1a0bbe3), including NVIDIA Blackwell hardware.

Correction: As @⁠luckyteagirl noted above, the GPU tests in hle::d3d12x::vram::tests (a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done and d32s8_targets_take_their_own_size_of_video_memory) call factory.EnumAdapters1(0) directly and ignore XCL_ADAPTER. On this machine adapter 0 is the NVIDIA GeForce RTX 5060, so the XCL_ADAPTER=Radeon vram:: run below actually executed those GPU fixtures on the RTX 5060 rather than the AMD RDNA2 iGPU (the hle::d3d12x::real tests in the broader hle::d3d12x:: run did select the Radeon adapter, hence the mesh-shader skip).

Tested

  • Host / toolchain: AMD Ryzen 7 7700, Windows 11, Rust 1.95.0 (59807616e 2026-04-14), DXC 1.8.2502.11, debug build.
  • NVIDIA GeForce RTX 5060 (Blackwell, adapter 0, driver 32.0.16.1088):
    • XCL_ADAPTER=5060 cargo test -p xcl --lib hle::d3d12x::vram:: -- --nocapture --test-threads=1: 16 passed, 0 failed, 1 ignored (churn_update_tile_mappings_timing), 0 skipped — a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done passed with no device removal.
    • XCL_ADAPTER=5060 cargo test -p xcl --lib hle::d3d12x:: -- --test-threads=4: 212 passed, 0 failed, 2 ignored, 0 skipped.
    • XCL_ADAPTER=5060 cargo test --workspace -- --test-threads=4: 1251 passed, 0 failed, 46 ignored (27 runtime SKIPPED: 20 native-wave64 tests on wave32 NVIDIA, 3 per-lane #1426 refusals, 2 missing D3D12 debug layer, 1 Developer Mode cache-disable, 1 heap windows).
  • AMD Radeon(TM) Graphics (RDNA2 iGPU, adapter 1, driver 32.0.21042.62):
    • XCL_ADAPTER=Radeon cargo test -p xcl --lib hle::d3d12x::vram:: -- --nocapture --test-threads=1: 16 passed, 0 failed, 1 ignored, 0 skipped (note: the GPU fixtures in vram::tests ignored XCL_ADAPTER and ran on adapter 0 / RTX 5060; see correction above).
    • XCL_ADAPTER=Radeon cargo test -p xcl --lib hle::d3d12x:: -- --test-threads=4: 212 passed, 0 failed, 2 ignored, 1 runtime SKIPPED (passthrough_mesh_stream_accepts_a_triangle_driver_blob: no mesh shaders).

Not tested

  • hle::d3d12x::vram::tests GPU fixtures on AMD RDNA2 (blocked by hard-coded EnumAdapters1(0) in the test fixtures), retail title run (scripts/smoke.ps1), the separate #2057 stress probe, full AMD workspace run, Intel GPUs, non-Windows hosts.

AI use

  • Antigravity (Google Gemini): checked out PR head b7f6b76, ran the focused vram/d3d12x suites plus the full RTX 5060 workspace suite, verified the EnumAdapters1(0) adapter selection in vram.rs, and wrote/corrected this report from the raw logs.
**@⁠GustavoEllwanger** on GitHub · 2026-11-25 13:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7163460093) · edited 2026-11-25 17:53 UTC Independent dual-GPU Windows verification on exact PR head `b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0` (parent `1a0bbe3`), including NVIDIA Blackwell hardware. > **Correction:** As @⁠luckyteagirl noted above, the GPU tests in `hle::d3d12x::vram::tests` (`a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done` and `d32s8_targets_take_their_own_size_of_video_memory`) call `factory.EnumAdapters1(0)` directly and ignore `XCL_ADAPTER`. On this machine adapter 0 is the NVIDIA GeForce RTX 5060, so the `XCL_ADAPTER=Radeon` `vram::` run below actually executed those GPU fixtures on the RTX 5060 rather than the AMD RDNA2 iGPU (the `hle::d3d12x::real` tests in the broader `hle::d3d12x::` run did select the Radeon adapter, hence the mesh-shader skip). **Tested** - Host / toolchain: AMD Ryzen 7 7700, Windows 11, Rust `1.95.0 (59807616e 2026-04-14)`, DXC `1.8.2502.11`, debug build. - **NVIDIA GeForce RTX 5060** (Blackwell, adapter 0, driver `32.0.16.1088`): - `XCL_ADAPTER=5060 cargo test -p xcl --lib hle::d3d12x::vram:: -- --nocapture --test-threads=1`: **16 passed, 0 failed, 1 ignored** (`churn_update_tile_mappings_timing`), 0 skipped — `a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done` passed with no device removal. - `XCL_ADAPTER=5060 cargo test -p xcl --lib hle::d3d12x:: -- --test-threads=4`: **212 passed, 0 failed, 2 ignored**, 0 skipped. - `XCL_ADAPTER=5060 cargo test --workspace -- --test-threads=4`: **1251 passed, 0 failed, 46 ignored** (27 runtime `SKIPPED`: 20 native-wave64 tests on wave32 NVIDIA, 3 per-lane `#1426` refusals, 2 missing D3D12 debug layer, 1 Developer Mode cache-disable, 1 heap windows). - **AMD Radeon(TM) Graphics** (RDNA2 iGPU, adapter 1, driver `32.0.21042.62`): - `XCL_ADAPTER=Radeon cargo test -p xcl --lib hle::d3d12x::vram:: -- --nocapture --test-threads=1`: **16 passed, 0 failed, 1 ignored**, 0 skipped *(note: the GPU fixtures in `vram::tests` ignored `XCL_ADAPTER` and ran on adapter 0 / RTX 5060; see correction above)*. - `XCL_ADAPTER=Radeon cargo test -p xcl --lib hle::d3d12x:: -- --test-threads=4`: **212 passed, 0 failed, 2 ignored**, 1 runtime `SKIPPED` (`passthrough_mesh_stream_accepts_a_triangle_driver_blob: no mesh shaders`). **Not tested** - `hle::d3d12x::vram::tests` GPU fixtures on AMD RDNA2 (blocked by hard-coded `EnumAdapters1(0)` in the test fixtures), retail title run (`scripts/smoke.ps1`), the separate `#2057` stress probe, full AMD workspace run, Intel GPUs, non-Windows hosts. **AI use** - Antigravity (Google Gemini): checked out PR head `b7f6b76`, ran the focused `vram`/`d3d12x` suites plus the full RTX 5060 workspace suite, verified the `EnumAdapters1(0)` adapter selection in `vram.rs`, and wrote/corrected this report from the raw logs.
Author
Owner

@⁠Dezmonius on GitHub · 2026-11-25 18:10 UTC · original · edited 2026-11-25 18:15 UTC

RTX 5070 verification of #2270

The PR's added D3D12.X VRAM test passed on this RTX 5070. Both builds stopped presenting during a paired title run before the prologue was visible. The logs recorded DirectStorage request failures and no D3D12 device removal or DRED page fault.

Tested

  • Base 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 and PR b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0, built in separate target directories from the commit snapshots without local source changes.
  • RTX 5070 12 GiB, NVIDIA 610.88 (32.0.16.1088), Core i7-7700K, 32 GiB RAM, Windows 10 Home build 19045, Rust 1.100.0 MSVC, release.
  • Archived local VRAM runs used cargo test --locked --offline --release -j 4 -p xcl --lib hle::d3d12x::vram::tests:: -- --show-output --test-threads=1. Base: 15 passed, 0 failed, 1 ignored. PR: 16 passed, 0 failed, 1 ignored. The added a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done also passed in isolation. Both runs ignored churn_update_tile_mappings_timing. Neither log reports a GPU skip.
  • Retail title 1.0.2.1 on 2026-11-25. One full run per build in PR → base order, each with the 600 s internal timer, copies of the same local profile and warm DXIL cache, Direct DXIL, DRED enabled, two DXC threads, PSO preload disabled, heap windows enabled, sparse coherent heaps (sparse:16), and networking disabled. The completed pair ran without scripted controller input.
Build Exit (wall time) PresentX calls Last Present window DirectStorage failures Min. available RAM
Base 0x0, internal timer (605.1 s) 1507 ~272 s 398 4.74 GiB
PR 0x0, internal timer (605.5 s) 1006 ~204 s 817 3.52 GiB

The last saved frames showed a loading illustration on base and a nearly black frame on the PR. The first logged DirectStorage request failure on each was 0x89240009, before its last Present. An earlier attempt per build overlapped a separate Cargo job and was stopped by the harness at its available-RAM floor (base 421.9 s, PR 90.4 s).

Not tested

  • Full workspace suite, current main, and the earlier device-removal scenario under conditions where the base reliably reproduces it. With one completed run per build and a shared system driver cache, frame and request counts alone do not establish a PR regression.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable in this session) ran the paired comparison, checked the saved VRAM test logs and title-run evidence, and drafted this report.

**@⁠Dezmonius** on GitHub · 2026-11-25 18:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7170539788) · edited 2026-11-25 18:15 UTC **RTX 5070 verification of #2270** The PR's added D3D12.X VRAM test passed on this RTX 5070. Both builds stopped presenting during a paired title run before the prologue was visible. The logs recorded DirectStorage request failures and no D3D12 device removal or DRED page fault. **Tested** - Base `1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6` and PR `b7f6b760e2ce94f68a05ed7c5aeac0360abac1b0`, built in separate target directories from the commit snapshots without local source changes. - RTX 5070 12 GiB, NVIDIA 610.88 (32.0.16.1088), Core i7-7700K, 32 GiB RAM, Windows 10 Home build 19045, Rust 1.100.0 MSVC, release. - Archived local VRAM runs used `cargo test --locked --offline --release -j 4 -p xcl --lib hle::d3d12x::vram::tests:: -- --show-output --test-threads=1`. Base: 15 passed, 0 failed, 1 ignored. PR: 16 passed, 0 failed, 1 ignored. The added `a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done` also passed in isolation. Both runs ignored `churn_update_tile_mappings_timing`. Neither log reports a GPU skip. - Retail title 1.0.2.1 on 2026-11-25. One full run per build in PR → base order, each with the 600 s internal timer, copies of the same local profile and warm DXIL cache, Direct DXIL, DRED enabled, two DXC threads, PSO preload disabled, heap windows enabled, sparse coherent heaps (`sparse:16`), and networking disabled. The completed pair ran without scripted controller input. | Build | Exit (wall time) | PresentX calls | Last Present window | DirectStorage failures | Min. available RAM | | --- | --- | ---: | ---: | ---: | ---: | | Base | `0x0`, internal timer (605.1 s) | 1507 | ~272 s | 398 | 4.74 GiB | | PR | `0x0`, internal timer (605.5 s) | 1006 | ~204 s | 817 | 3.52 GiB | The last saved frames showed a loading illustration on base and a nearly black frame on the PR. The first logged DirectStorage request failure on each was `0x89240009`, before its last Present. An earlier attempt per build overlapped a separate Cargo job and was stopped by the harness at its available-RAM floor (base 421.9 s, PR 90.4 s). **Not tested** - Full workspace suite, current main, and the earlier device-removal scenario under conditions where the base reliably reproduces it. With one completed run per build and a shared system driver cache, frame and request counts alone do not establish a PR regression. **AI use** OpenAI Codex (GPT-6 family, exact variant unavailable in this session) ran the paired comparison, checked the saved VRAM test logs and title-run evidence, and drafted this report.
Author
Owner

@⁠bstillbstill on GitHub · 2026-11-25 17:15 UTC · original · edited 2026-11-25 18:46 UTC

Test report on an RTX 3090 Ti (Ampere): no difference from this PR on this card, either on #2057 or on its own
head.
On #2057 the retail title's silent 0x887a0005 in the world comes at the same time with and without it; on
this PR's own head the title stops presenting within about 2 s of the world load with and without it. Your probe passes here, so the
race doesn't seem to happen on this card.

Setup

  • RTX 3090 Ti 24 GB (driver 621.01), i9-13900K, 31.7 GB RAM, Windows 11 Pro 26300, Rust 1.100.0, release for the
    runs, debug for the tests.
  • Retail title of #505 (1.0.2.1), all 2,689 compute pipelines built ahead for each translator, 300 s runs, scripted A
    presses, XCL_NETWORK=0 XCL_ACTIVITY=1; runs alternated with and without this PR on the same day.

1. On #2057 (4df1e6e + treybertram06's one-line upload wait from #1452, with and without b7f6b76
cherry-picked; it conflicts in vram::before_execute, because #2057 doesn't have main's newer reclaim code there,
so I kept #2057's body and added this PR's two lines, release_held under the lock and the drop after it).
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_LOOK_SKIP=1 XCL_HUGE_PSO_CONCURRENCY=6.

run this PR world load (first 2 s with ≥ 1,000 dispatches) removed (0x887a0005) frames shown after 64 s
h1 yes 68 s 132.9 s 490
h2 yes 64 s 128.9 s 484
h3 yes 64 s 105.3 s 335
b1 no 64 s 130.3 s 468
b2 no 64 s 96.8 s 243
  • All five end the same way: no queue wait timed out, no watchdog release, then the silent removal and the title's
    0x80000003. The scene stays grey in all of them.
  • The same "without" build was removed after 11–18 s in the world the night before (g4–g6 on #2057:
    73.6 s and 83.3 s, one freeze at 82 s); here it lasts 33–66 s. Something besides this PR moves that time between
    days, so only same-day runs are compared.

2. On this PR's own head (b7f6b76) against its parent main (1a0bbe3), both as they are. That main has
no XCL_UMA_SHADOW, so the coherent window is used in place (as in the 5070 Ti run on #2057).
XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_HUGE_PSO_CONCURRENCY=6.

run build world load last frames queue waits not done within 5,000 ms end
m1 main 72 s ~72 s 6, from 76.9 s no removal; no frame to the 300 s limit, then 0x887a0007 in XCL's queue drain at exit
p1 this PR 70 s ~70 s 7, from 74.8 s 0x887a0006 at 162.0 s
m2 main – – – title crash in the menus at 31.7 s (access violation in VCRUNTIME140.dll, read at 0xc491de410)
p2 this PR 74 s ~76 s 42, from 77.6 s 0x887a0006 at 106.7 s
m3 main 70 s ~72 s 51, from 73.8 s 0x887a0006 at 106.4 s

So on this card the title doesn't get past the world load's first seconds on this base, with or without the PR, and
never reaches the in-world stretch where the copy-fault removal would show.

Tests

  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 on b7f6b76:
    1251 passed, 0 failed, 46 ignored, including
    a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done. 25 SKIPPED lines: 20 "no wave64", 3
    per-lane f16 forms refused (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), pso_measurement_compiles_an_exact_synthetic_record
    (driver cache can't be disabled without Developer Mode), heap_window_out_of_memory_falls_back_to_the_switch_form
    (no heap windows).
  • On the #2057 merge (debug): cargo test -p xcl --lib hle::d3d12x::vram -- --test-threads=4: 12 passed, 0 failed,
    1 ignored.
  • Your probe (probe/reserved-copy-faults at b39608e, debug, one process per case as in your loop): all 13
    cases pass, no removal.
    Mapped tiles read back right and NULL tiles read 0; r_null_during_copyq,
    r_null_during_direct and r_other_tiles_during_copyq ran all 20 rounds with 20,900 / 24,628 / 15,808 remaps.
    So the race doesn't remove the device on this card (as on the 3070 and 4070 Ti), which fits this PR changing
    nothing in the runs above.

Not tested: this PR merged with the latest main (it conflicts with 68a284a) or in the
RTX 5070 Ti stack on #2057; AMD.

AI use: Claude Code (Claude Opus 5.5) built the trees, ran everything above and wrote this report.

**@⁠bstillbstill** on GitHub · 2026-11-25 17:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/2270#issuecomment-7169231363) · edited 2026-11-25 18:46 UTC Test report on an RTX 3090 Ti (Ampere): **no difference from this PR on this card, either on #2057 or on its own head.** On #2057 the retail title's silent `0x887a0005` in the world comes at the same time with and without it; on this PR's own head the title stops presenting within about 2 s of the world load with and without it. Your probe passes here, so the race doesn't seem to happen on this card. **Setup** - RTX 3090 Ti 24 GB (driver 621.01), i9-13900K, 31.7 GB RAM, Windows 11 Pro 26300, Rust 1.100.0, release for the runs, debug for the tests. - Retail title of #505 (1.0.2.1), all 2,689 compute pipelines built ahead for each translator, 300 s runs, scripted A presses, `XCL_NETWORK=0 XCL_ACTIVITY=1`; runs alternated with and without this PR on the same day. **1. On #2057** (`4df1e6e` + treybertram06's one-line upload wait from #1452, with and without `b7f6b76` cherry-picked; it conflicts in `vram::before_execute`, because #2057 doesn't have `main`'s newer reclaim code there, so I kept #2057's body and added this PR's two lines, `release_held` under the lock and the drop after it). `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1 XCL_LOOK_SKIP=1 XCL_HUGE_PSO_CONCURRENCY=6`. | run | this PR | world load (first 2 s with ≥ 1,000 dispatches) | removed (`0x887a0005`) | frames shown after 64 s | |---|---|---|---|---| | h1 | yes | 68 s | 132.9 s | 490 | | h2 | yes | 64 s | 128.9 s | 484 | | h3 | yes | 64 s | 105.3 s | 335 | | b1 | no | 64 s | 130.3 s | 468 | | b2 | no | 64 s | 96.8 s | 243 | - All five end the same way: no queue wait timed out, no watchdog release, then the silent removal and the title's `0x80000003`. The scene stays grey in all of them. - The same "without" build was removed after 11–18 s in the world the night before ([g4–g6 on #2057](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057): 73.6 s and 83.3 s, one freeze at 82 s); here it lasts 33–66 s. Something besides this PR moves that time between days, so only same-day runs are compared. **2. On this PR's own head** (`b7f6b76`) against its parent `main` (`1a0bbe3`), both as they are. That `main` has no `XCL_UMA_SHADOW`, so the coherent window is used in place (as in the 5070 Ti run on #2057). `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_HUGE_PSO_CONCURRENCY=6`. | run | build | world load | last frames | queue waits not done within 5,000 ms | end | |---|---|---|---|---|---| | m1 | `main` | 72 s | ~72 s | 6, from 76.9 s | no removal; no frame to the 300 s limit, then `0x887a0007` in XCL's queue drain at exit | | p1 | this PR | 70 s | ~70 s | 7, from 74.8 s | `0x887a0006` at 162.0 s | | m2 | `main` | – | – | – | title crash in the menus at 31.7 s (access violation in `VCRUNTIME140.dll`, read at `0xc491de410`) | | p2 | this PR | 74 s | ~76 s | 42, from 77.6 s | `0x887a0006` at 106.7 s | | m3 | `main` | 70 s | ~72 s | 51, from 73.8 s | `0x887a0006` at 106.4 s | So on this card the title doesn't get past the world load's first seconds on this base, with or without the PR, and never reaches the in-world stretch where the copy-fault removal would show. **Tests** - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` on `b7f6b76`: **1251 passed, 0 failed, 46 ignored**, including `a_superseded_texture_keeps_its_tiles_until_the_work_before_it_is_done`. 25 `SKIPPED` lines: 20 "no wave64", 3 per-lane f16 forms refused (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`), `pso_measurement_compiles_an_exact_synthetic_record` (driver cache can't be disabled without Developer Mode), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - On the #2057 merge (debug): `cargo test -p xcl --lib hle::d3d12x::vram -- --test-threads=4`: 12 passed, 0 failed, 1 ignored. - Your probe (`probe/reserved-copy-faults` at `b39608e`, debug, one process per case as in your loop): **all 13 cases pass, no removal.** Mapped tiles read back right and NULL tiles read 0; `r_null_during_copyq`, `r_null_during_direct` and `r_other_tiles_during_copyq` ran all 20 rounds with 20,900 / 24,628 / 15,808 remaps. So the race doesn't remove the device on this card (as on the 3070 and 4070 Ti), which fits this PR changing nothing in the runs above. **Not tested:** this PR merged with the latest `main` (it conflicts with `68a284a`) or in the [RTX 5070 Ti stack on #2057](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2057); AMD. AI use: Claude Code (Claude Opus 5.5) built the trees, ran everything above and wrote this report.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/hle/d3d12x/vram.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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