D3D12.X: keep re-checking small textures in the unwatched upload range #3617

Open
throny wants to merge 1 commit from upstream-pr/3617 into main
throny commented 2026-12-01 21:14:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T21:14:21Z.


Control-hint glyphs lose letters with XCL_UMA_DRIVER=mixed ("B g / K b g" instead of "Bewegen / Kamera bewegen"). Title textures are copies that XCL re-uploads when a write watch reports a change; the GPU_UPLOAD range of the mixed driver has no write watch, so a texture there is uploaded when it is made and after that only by the stream recheck. That recheck fingerprints three 16 KiB slices at five milestones (4 to 400 frames after the upload) and then drops the texture for good, so a small texture the CPU rewrites later, or outside the slices, is never uploaded again. This adds a switch, XCL_UNWATCHED_RECHECK=1 (off by default), that keeps such textures under a whole-texture check.

Part of #1049 (not shown that the six textures it re-uploads are the glyph atlas itself; the text came out complete in the one run with the switch on).

What is in it

  • crates/xcl/src/hle/d3d12x/title_textures.rs: with the switch, a texture of up to 4 MiB in the committed window that is not fully write-watched stays in the stream recheck after the milestones, is hashed whole every 16 frames (read through with_title_bytes), under a frame budget of 8 MiB and 64 textures (longest unchecked first, the first always made); an entry with no baseline yet is hashed under the same budget; entries seeded in one frame are staggered over the 16-frame period by a hash of the resource. A change queues a whole upload as before. A texture that becomes GPU-written is still removed by publish_submission_effects, as before (the switch does not change that). Watched memory, paged textures, textures over 4 MiB and the switch off are unchanged. Unit test steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget (budget, count cap, stagger).
  • README.md: one line for the switch.

Tested

  • RTX 4080 (NVIDIA), Windows 11 Pro, Rust stable-x86_64-pc-windows-msvc, debug.

  • cargo build --workspace && cargo test --workspace -- --test-threads=4 on head 4714ed9b (after bmjask's third review): 3007 passed, 0 failed, 52 ignored, 25 SKIPPED lines.

  • The in-world A/B below (402 vs 404) was made on the pre-review commit e125eda8, before the frame count cap, the stagger and the baseline budget; it was not repeated on c9283790.

  • 25 SKIPPED lines: 22 no wave64 (RTX 4080 has no wave64), 2 no heap windows (heap_window_out_of_memory_falls_back_to_the_switch_form, bind::tests::two_pass_binds_set_the_shared_view_heap), 1 shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache: Developer Mode required).

  • A/B on the retail title (same build with and without the switch, XCL_UMA_DRIVER=mixed, 900 s, hint phase, near-white pixels in the left quarter of each 960x540 frame):

    • run 402, switch off: 355 px, hint text "B g / K b g" (letters missing), 3.10 presents/s from 240 s
    • run 404, switch on: 582 px, hint text complete, 3.07 presents/s from 240 s
    • the recheck's share of the submit cost stays at 0.00-0.20 ms per submit (switch off: 0.00-0.24).
  • Switch-on cost at 412e11e9 (review point 2): a 900 s warm world run with XCL_UNWATCHED_RECHECK=1 (run 492, XCL_RESIDENCY_PRIORITY=1): 3.00 presents/s from 240 s, no device removal, no crash (main on this machine: 3.0-3.2).

Regression run

main 817eb1fc9:

xcl-smoke v1
commit: 817eb1fc9fb0763008ae5d8de1f7f586f442b51d
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1559 (PresentX 1559)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 17215 MB

this PR's head:

xcl-smoke v1
commit: 4714ed9bb4f9074f7795d9b5d8117f297212cdd7
gpu: NVIDIA GeForce RTX 4080
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1581 (PresentX 1582)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 17266 MB

Not tested

  • n = 1 per side for the text comparison (runs 402 vs 404). The letters could also be a timing effect; more pairs are needed.
  • One more run with the switch on (run 403) lost the device at +95 s, before the hint phase: 0x887a0006, Aftermath page fault "Read by Graphics, BC7 128x1024, not placed". Plain main's run 344 lost the device the same way at +90 s, so it is probably the known loss at the world load, but 1 of 2 switch runs ended that way and 0 of 1 without.
  • Textures over 4 MiB in the unwatched range keep only the five milestones; with many small textures there a change can wait several cycles of the frame budget.
  • AMD (RDNA4 / RDNA2), Series S layout, wave64 GPUs, the other UMA driver modes with the switch on.

AI use

  • Claude Code (Claude Fable 5.2) found the cause and wrote the fix; Claude Sonnet 5.5 prepared the branch and ran the tests; Claude Opus 5.5 coordinated.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5594667018 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617). Originally posted by [throny](https://github.com/throny) on 2026-12-01T21:14:21Z. --- Control-hint glyphs lose letters with `XCL_UMA_DRIVER=mixed` ("B g / K b g" instead of "Bewegen / Kamera bewegen"). Title textures are copies that XCL re-uploads when a write watch reports a change; the `GPU_UPLOAD` range of the mixed driver has no write watch, so a texture there is uploaded when it is made and after that only by the stream recheck. That recheck fingerprints three 16 KiB slices at five milestones (4 to 400 frames after the upload) and then drops the texture for good, so a small texture the CPU rewrites later, or outside the slices, is never uploaded again. This adds a switch, `XCL_UNWATCHED_RECHECK=1` (off by default), that keeps such textures under a whole-texture check. Part of #1049 (not shown that the six textures it re-uploads are the glyph atlas itself; the text came out complete in the one run with the switch on). **What is in it** - `crates/xcl/src/hle/d3d12x/title_textures.rs`: with the switch, a texture of up to 4 MiB in the committed window that is not fully write-watched stays in the stream recheck after the milestones, is hashed whole every 16 frames (read through `with_title_bytes`), under a frame budget of 8 MiB and 64 textures (longest unchecked first, the first always made); an entry with no baseline yet is hashed under the same budget; entries seeded in one frame are staggered over the 16-frame period by a hash of the resource. A change queues a whole upload as before. A texture that becomes GPU-written is still removed by `publish_submission_effects`, as before (the switch does not change that). Watched memory, paged textures, textures over 4 MiB and the switch off are unchanged. Unit test `steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget` (budget, count cap, stagger). - `README.md`: one line for the switch. **Tested** - RTX 4080 (NVIDIA), Windows 11 Pro, Rust stable-x86_64-pc-windows-msvc, debug. - `cargo build --workspace && cargo test --workspace -- --test-threads=4` on head `4714ed9b` (after bmjask's third review): 3007 passed, 0 failed, 52 ignored, 25 `SKIPPED` lines. - The in-world A/B below (402 vs 404) was made on the pre-review commit `e125eda8`, before the frame count cap, the stagger and the baseline budget; it was not repeated on `c9283790`. - 25 `SKIPPED` lines: 22 `no wave64` (RTX 4080 has no wave64), 2 `no heap windows` (`heap_window_out_of_memory_falls_back_to_the_switch_form`, `bind::tests::two_pass_binds_set_the_shared_view_heap`), 1 `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache: Developer Mode required). - A/B on the retail title (same build with and without the switch, `XCL_UMA_DRIVER=mixed`, 900 s, hint phase, near-white pixels in the left quarter of each 960x540 frame): - run 402, switch off: 355 px, hint text "B g / K b g" (letters missing), 3.10 presents/s from 240 s - run 404, switch on: 582 px, hint text complete, 3.07 presents/s from 240 s - the recheck's share of the submit cost stays at 0.00-0.20 ms per submit (switch off: 0.00-0.24). - Switch-on cost at `412e11e9` (review point 2): a 900 s warm world run with `XCL_UNWATCHED_RECHECK=1` (run 492, `XCL_RESIDENCY_PRIORITY=1`): 3.00 presents/s from 240 s, no device removal, no crash (main on this machine: 3.0-3.2). **Regression run** main `817eb1fc9`: ``` xcl-smoke v1 commit: 817eb1fc9fb0763008ae5d8de1f7f586f442b51d gpu: NVIDIA GeForce RTX 4080 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1559 (PresentX 1559) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 17215 MB ``` this PR's head: ``` xcl-smoke v1 commit: 4714ed9bb4f9074f7795d9b5d8117f297212cdd7 gpu: NVIDIA GeForce RTX 4080 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1581 (PresentX 1582) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 17266 MB ``` **Not tested** - n = 1 per side for the text comparison (runs 402 vs 404). The letters could also be a timing effect; more pairs are needed. - One more run with the switch on (run 403) lost the device at +95 s, before the hint phase: `0x887a0006`, Aftermath page fault "Read by Graphics, BC7 128x1024, not placed". Plain main's run 344 lost the device the same way at +90 s, so it is probably the known loss at the world load, but 1 of 2 switch runs ended that way and 0 of 1 without. - Textures over 4 MiB in the unwatched range keep only the five milestones; with many small textures there a change can wait several cycles of the frame budget. - AMD (RDNA4 / RDNA2), Series S layout, wave64 GPUs, the other UMA driver modes with the switch on. **AI use** - Claude Code (Claude Fable 5.2) found the cause and wrote the fix; Claude Sonnet 5.5 prepared the branch and ran the tests; Claude Opus 5.5 coordinated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Foniass commented 2026-12-01 21:34:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T21:34:43Z.


merge-check
base: f07e426dad
head: c928379000
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2905 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (+153/-11). With XCL_UNWATCHED_RECHECK=1, a title texture of up to 4 MiB in a committed window that isn't fully write-watched stays in the stream recheck after the milestones and is hashed whole every 16 frames under a per-frame budget; with the switch off nothing changes. Findings: (1) The whole hash at seed time has no cap and is a GPU round trip. In seed_stream_recheck (title_textures.rs ~2468-2478), every whole upload of a kept texture calls stream_fingerprint(.., true) -> with_title_bytes, which in the GPU_UPLOAD range goes to read_vram_bytes (uma_driver.rs ~658-687): a CopyBufferRegion, a signal, a fence wait with a 5 s timeout and a new len-sized Vec, one texture at a time, on the submit path before upload_all. This applies to every new upload and every re-upload the check itself triggers; the 8 MiB / 64-texture budget only covers the recheck side, so a frame that creates thousands of small textures (world load) gets thousands of synchronous readbacks, and even the budgeted recheck can make up to 64 serial round trips a frame. The description and README ("at most 8 MiB and 64 textures read a frame") leave this out. (2) The switch-on cost isn't measured at the head commit. The description's A/B was made on e125eda8, before the cap, the stagger and the baseline budget; both of its smoke blocks run with the switch off, and one of its two switch-on runs lost the device at +95 s. The switch-on smoke below is 60 s on NVIDIA and doesn't cover world load. (3) The tests don't exercise the wiring. steady_recheck() is read once through a OnceLock, so no test runs seed_stream_recheck or recheck_streamed_unwatched_at with the switch on: nothing shows a kept entry surviving past the 400-frame milestone, a rewrite after the last milestone being re-queued, or the 4 MiB limit. The new test covers only the helpers (recheck_interval, steady_waiting, steady_base, stream_fingerprint, including a byte changed outside the slices). (4) Kept textures lose the early milestones. first_stage(true) plus steady_base put the first check 16-31 frames after the upload (later when over budget) instead of 4 / 12 / 40, so streaming writes landing shortly after a small texture is made are caught later with the switch on than without it. (5) A match arm that is effectively dead and can't clean up. Some(e) if e.gpu_written && steady_keeps(..) => {} (~2533) is in practice never reached, since publish_submission_effects removes the entry; if it were, the entry would never be pruned and would stay due every frame under the TEXTURES lock. Keeping the plain prune would be simpler. Related: a kept texture whose gpu_written is later cleared by a download (~4117) isn't re-seeded until its next whole upload, so "for as long as they live" overstates the coverage. (6) README is imprecise: besides the seed-time reads in (1), the first check is 16-31 frames, and with more than about 1024 kept textures the 64-check cap stretches the period to about N/64 frames, with every waiting entry sorted and looked up under TEXTURES each frame. Fine: the baseline is the hash at the last whole upload (re-seeded before upload_all; partial uploads keep it); a detected change re-uploads through the existing pending path at the next submit with main's ordering, and pending entries are skipped, so nothing uploads twice; forget, register and retire_range drop entries, and the committed window is never decommitted, so reading a freed texture can't fault; steady_waiting checks the oldest first, so nothing starves; with the switch off, steady_keeps returns early, no new locks are taken, and the milestones and retirement are as on main.
performance: 60 s smoke of a retail title, main f07e426d vs this merge (c9283790): 1672 -> 1683 frames shown (100 %; last presents per 2 s: 60 60 60), peak commit 17352 -> 17229 MB, 0 device removals, 0 crashes. With XCL_UMA_DRIVER=mixed XCL_UNWATCHED_RECHECK=1: 1673 frames, peak commit 17700 MB, 0 device removals, 0 crashes, and the log shows the new check running; a 60 s run doesn't reach world load, where finding 1 would cost most.
verdict: not yet: with the switch on, every whole upload of a kept texture does a synchronous GPU readback outside the per-frame budget (finding 1), so the cost at world load is unmeasured and the description's "at most 8 MiB and 64 textures read a frame" doesn't hold; and no test runs the new path with the switch on (finding 3). With the switch off nothing changes, the suite passes, and both smoke runs are clean
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7326474136 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7326474136). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T21:34:43Z. --- merge-check base: f07e426dade72aa7112cf6bfe08ca6f6ff5a9d5c head: c92837900097f1495fe83b3ccb774eae151dbab8 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2905 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none review: read the whole diff (+153/-11). With `XCL_UNWATCHED_RECHECK=1`, a title texture of up to 4 MiB in a committed window that isn't fully write-watched stays in the stream recheck after the milestones and is hashed whole every 16 frames under a per-frame budget; with the switch off nothing changes. Findings: (1) **The whole hash at seed time has no cap and is a GPU round trip.** In `seed_stream_recheck` (`title_textures.rs` ~2468-2478), every whole upload of a kept texture calls `stream_fingerprint(.., true)` -> `with_title_bytes`, which in the `GPU_UPLOAD` range goes to `read_vram_bytes` (`uma_driver.rs` ~658-687): a `CopyBufferRegion`, a signal, a fence wait with a 5 s timeout and a new `len`-sized `Vec`, one texture at a time, on the submit path before `upload_all`. This applies to every new upload and every re-upload the check itself triggers; the 8 MiB / 64-texture budget only covers the recheck side, so a frame that creates thousands of small textures (world load) gets thousands of synchronous readbacks, and even the budgeted recheck can make up to 64 serial round trips a frame. The description and README ("at most 8 MiB and 64 textures read a frame") leave this out. (2) **The switch-on cost isn't measured at the head commit.** The description's A/B was made on `e125eda8`, before the cap, the stagger and the baseline budget; both of its smoke blocks run with the switch off, and one of its two switch-on runs lost the device at +95 s. The switch-on smoke below is 60 s on NVIDIA and doesn't cover world load. (3) **The tests don't exercise the wiring.** `steady_recheck()` is read once through a `OnceLock`, so no test runs `seed_stream_recheck` or `recheck_streamed_unwatched_at` with the switch on: nothing shows a kept entry surviving past the 400-frame milestone, a rewrite after the last milestone being re-queued, or the 4 MiB limit. The new test covers only the helpers (`recheck_interval`, `steady_waiting`, `steady_base`, `stream_fingerprint`, including a byte changed outside the slices). (4) **Kept textures lose the early milestones.** `first_stage(true)` plus `steady_base` put the first check 16-31 frames after the upload (later when over budget) instead of 4 / 12 / 40, so streaming writes landing shortly after a small texture is made are caught later with the switch on than without it. (5) **A match arm that is effectively dead and can't clean up.** `Some(e) if e.gpu_written && steady_keeps(..) => {}` (~2533) is in practice never reached, since `publish_submission_effects` removes the entry; if it were, the entry would never be pruned and would stay due every frame under the `TEXTURES` lock. Keeping the plain prune would be simpler. Related: a kept texture whose `gpu_written` is later cleared by a download (~4117) isn't re-seeded until its next whole upload, so "for as long as they live" overstates the coverage. (6) **README is imprecise:** besides the seed-time reads in (1), the first check is 16-31 frames, and with more than about 1024 kept textures the 64-check cap stretches the period to about N/64 frames, with every waiting entry sorted and looked up under `TEXTURES` each frame. Fine: the baseline is the hash at the last whole upload (re-seeded before `upload_all`; partial uploads keep it); a detected change re-uploads through the existing pending path at the next submit with main's ordering, and pending entries are skipped, so nothing uploads twice; `forget`, `register` and `retire_range` drop entries, and the committed window is never decommitted, so reading a freed texture can't fault; `steady_waiting` checks the oldest first, so nothing starves; with the switch off, `steady_keeps` returns early, no new locks are taken, and the milestones and retirement are as on main. performance: 60 s smoke of a retail title, main f07e426d vs this merge (c9283790): 1672 -> 1683 frames shown (100 %; last presents per 2 s: 60 60 60), peak commit 17352 -> 17229 MB, 0 device removals, 0 crashes. With `XCL_UMA_DRIVER=mixed XCL_UNWATCHED_RECHECK=1`: 1673 frames, peak commit 17700 MB, 0 device removals, 0 crashes, and the log shows the new check running; a 60 s run doesn't reach world load, where finding 1 would cost most. verdict: not yet: with the switch on, every whole upload of a kept texture does a synchronous GPU readback outside the per-frame budget (finding 1), so the cost at world load is unmeasured and the description's "at most 8 MiB and 64 textures read a frame" doesn't hold; and no test runs the new path with the switch on (finding 3). With the switch off nothing changes, the suite passes, and both smoke runs are clean hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 AI-written and posted by Foniass without a human check of each point.
throny commented 2026-12-01 22:01:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T22:01:50Z.


Stability follow-up on the switch (pre-review build of this change, RTX 4080, 900 s each, same save and inputs, no draws skipped): runs 405 and 407 with XCL_UNWATCHED_RECHECK=1 3.05 and 3.07 presents/s, run 406 without it 2.97; no device removal or crash in any of the three. So with run 403 that is 1 loss in 4 runs with the switch and the same fault plain main showed once — not tied to the switch as far as these runs go.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7327166309 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7327166309). Originally posted by [throny](https://github.com/throny) on 2026-12-01T22:01:50Z. --- Stability follow-up on the switch (pre-review build of this change, RTX 4080, 900 s each, same save and inputs, no draws skipped): runs 405 and 407 with `XCL_UNWATCHED_RECHECK=1` 3.05 and 3.07 presents/s, run 406 without it 2.97; no device removal or crash in any of the three. So with run 403 that is 1 loss in 4 runs with the switch and the same fault plain `main` showed once — not tied to the switch as far as these runs go. AI use: Claude Code (Claude Opus 5.5).
vasanex commented 2026-12-02 00:18:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T00:18:15Z.


merge-check claim
head: c928379000

<!-- greyfinch-sync:ivall/xcl:comment:7330387580 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7330387580). Originally posted by [vasanex](https://github.com/vasanex) on 2026-12-02T00:18:15Z. --- merge-check claim head: c92837900097f1495fe83b3ccb774eae151dbab8
vasanex commented 2026-12-02 00:37:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vasanex on 2026-12-02T00:37:01Z.


merge-check
base: 1c8b551475
head: c928379000
merge: clean (merged tree 8cc07b4e, git diff --check clean)
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same set as on the base; failing: none. Base alone, same machine: 2909 passed, 0 failed, 51 ignored. The new test steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget passes.
review: whole diff read (title_textures.rs, README.md), in the merge result. No blocking finding. With the switch off nothing changes: steady_keeps is false everywhere, so every entry starts at stage 0, is fingerprinted by the three slices and is removed after the last milestone as on main; an entry past the milestones (now due every 16 frames instead of never) cannot exist without the switch. With the switch on: the whole-texture read goes through with_title_bytes, which reads a GPU_UPLOAD segment from the GPU's copy and the committed window in place (never decommitted), so the read cannot fault; a frame's steady checks are capped at 8 MiB and 64 textures, oldest first, and one that waits stays due; an unchanged kept entry is rescheduled from the current frame, a changed one restarts with the stagger. Smaller points: (1) the unit test covers the helpers (interval, budget, stagger, whole hash); that recheck_streamed_unwatched_at keeps an entry past the milestones and queues the upload is not tested; (2) a kept texture that is GPU-written and still listed is neither checked nor pruned and stays due every frame (a map lookup a frame; the comment says publish_submission_effects removes it); (3) as the description says, the text comparison is n = 1 per side and was made on a commit before the budget and stagger. Duplicates: none open; #3537 (same author, closed draft) was the earlier form.
performance: off by default: one OnceLock read per seeded texture and per due check, reasoned, not measured. With the switch on, up to 8 MiB hashed per frame on the submitting thread; the description measured 0.00-0.20 ms per submit on an RTX 4080. No title run in this check.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0, debug / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7330765945 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7330765945). Originally posted by [vasanex](https://github.com/vasanex) on 2026-12-02T00:37:01Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: c92837900097f1495fe83b3ccb774eae151dbab8 merge: clean (merged tree 8cc07b4e, `git diff --check` clean) build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2910 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 cannot disable the driver cache), the same set as on the base; failing: none. Base alone, same machine: 2909 passed, 0 failed, 51 ignored. The new test `steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget` passes. review: whole diff read (title_textures.rs, README.md), in the merge result. No blocking finding. With the switch off nothing changes: `steady_keeps` is false everywhere, so every entry starts at stage 0, is fingerprinted by the three slices and is removed after the last milestone as on main; an entry past the milestones (now due every 16 frames instead of never) cannot exist without the switch. With the switch on: the whole-texture read goes through `with_title_bytes`, which reads a `GPU_UPLOAD` segment from the GPU's copy and the committed window in place (never decommitted), so the read cannot fault; a frame's steady checks are capped at 8 MiB and 64 textures, oldest first, and one that waits stays due; an unchanged kept entry is rescheduled from the current frame, a changed one restarts with the stagger. Smaller points: (1) the unit test covers the helpers (interval, budget, stagger, whole hash); that `recheck_streamed_unwatched_at` keeps an entry past the milestones and queues the upload is not tested; (2) a kept texture that is GPU-written and still listed is neither checked nor pruned and stays due every frame (a map lookup a frame; the comment says `publish_submission_effects` removes it); (3) as the description says, the text comparison is n = 1 per side and was made on a commit before the budget and stagger. Duplicates: none open; #3537 (same author, closed draft) was the earlier form. performance: off by default: one `OnceLock` read per seeded texture and per due check, reasoned, not measured. With the switch on, up to 8 MiB hashed per frame on the submitting thread; the description measured 0.00-0.20 ms per submit on an RTX 4080. No title run in this check. verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 3080 10 GB (driver 621.40), AMD Ryzen 9 7950X, Windows 11 Pro 26200, rustc 1.100.0, debug / Claude Code with Claude Fable 5.2. Run and posted without a human check of each point.
Pipodi commented 2026-12-02 11:10:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-02T11:10:31Z.


merge-check claim withdrawn
head: c928379000

Withdrawn: this PR is labelled needs:amd-test and we have no AMD hardware. Sorry for the noise; the slot is free.

<!-- greyfinch-sync:ivall/xcl:comment:7343532207 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7343532207). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-12-02T11:10:31Z. --- merge-check claim withdrawn head: c92837900097f1495fe83b3ccb774eae151dbab8 Withdrawn: this PR is labelled needs:amd-test and we have no AMD hardware. Sorry for the noise; the slot is free.
bmjask commented 2026-12-02 16:10:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T16:10:32Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 2360

@@ -2322,6 +2322,75 @@ fn stream_recheck_enabled() -> bool {
     *ON.get_or_init(|| std::env::var("XCL_TEXTURE_STREAM_RECHECK").map_or(true, |v| v.trim() != "0"))
 }
 
+/// `XCL_UNWATCHED_RECHECK=1` (off unless given): a texture of up to `STEADY_MAX_BYTES` in a
+/// committed window that is not fully write-watched (such as the `GPU_UPLOAD` segments of
+/// `XCL_UMA_DRIVER=mixed`) is not retired after the last milestone: it is checked again every
+/// `STEADY_EVERY` frames for as long as it lives, and its fingerprint hashes all of it (read by
+/// the GPU: `with_title_bytes`). A font atlas the title fills glyph by glyph is written minutes
+/// after it was made and outside the three sampled slices, and its text lost letters.
+fn steady_recheck() -> bool {
+    static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
+    *ON.get_or_init(|| std::env::var("XCL_UNWATCHED_RECHECK").is_ok_and(|v| v.trim() == "1"))
+}
+const STEADY_MAX_BYTES: usize = 4 << 20;
+const STEADY_EVERY: u64 = 16;
+/// the bytes the steady checks of one frame read at most (the first one is always made)
+const STEADY_BUDGET: usize = 8 << 20;
+/// the steady checks (whole-hash reads of a texture) of one frame at most
+const STEADY_MAX_CHECKS: usize = 64;
+
+/// Frames (below `STEADY_EVERY`) by which the schedule of the entry of `res` is moved, so that
+/// the entries seeded in one frame do not all come due together every `STEADY_EVERY` frames.
+fn steady_stagger(res: usize) -> u64 {
+    ((res as u64).wrapping_mul(0x9E37_79B9_7F4A_7C15) >> 32) % STEADY_EVERY
+}
+
+/// The `base_frame` of an entry made or reset at `frame`.
+fn steady_base(res: usize, frame: u64, kept: bool) -> u64 {
+    if kept { frame + steady_stagger(res) } else { frame }
+}
+
+/// Whether the unwatched texture at `src` is checked whole and for as long as it lives.
+fn steady_keeps(src: usize, size: usize) -> bool {
+    steady_recheck() && size <= STEADY_MAX_BYTES && crate::gpu::uma::get().is_some_and(|u| u.in_committed_window(src, size))
+}
+
+/// The stage an entry starts at: a kept one (`steady_keeps`) past the milestones, so that all its
+/// checks, which read all of it, come under the frame's budget.
+fn first_stage(kept: bool) -> u8 {

High: first_stage(true) starts kept entries past all milestones, so a kept texture is first rechecked 16 + stagger (16-31) frames after upload instead of at the 4- and 12-frame milestones it had before. With the switch on, if a texture is uploaded zeroed and the title streams its contents in 5 frames later, the PR used to catch it at frame 4/12 but now waits 16-31 frames plus any budget delay. At the 3.07 presents/s measured in run 404 that's 5-10 s of stale content, the late-streaming case the milestones exist for. Keeping the early milestones for kept entries, then switching to the steady interval, would keep both.

<!-- greyfinch-sync:ivall/xcl:review-comment:4772555346 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4772555346). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T16:10:32Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 2360 ~~~~diff @@ -2322,6 +2322,75 @@ fn stream_recheck_enabled() -> bool { *ON.get_or_init(|| std::env::var("XCL_TEXTURE_STREAM_RECHECK").map_or(true, |v| v.trim() != "0")) } +/// `XCL_UNWATCHED_RECHECK=1` (off unless given): a texture of up to `STEADY_MAX_BYTES` in a +/// committed window that is not fully write-watched (such as the `GPU_UPLOAD` segments of +/// `XCL_UMA_DRIVER=mixed`) is not retired after the last milestone: it is checked again every +/// `STEADY_EVERY` frames for as long as it lives, and its fingerprint hashes all of it (read by +/// the GPU: `with_title_bytes`). A font atlas the title fills glyph by glyph is written minutes +/// after it was made and outside the three sampled slices, and its text lost letters. +fn steady_recheck() -> bool { + static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new(); + *ON.get_or_init(|| std::env::var("XCL_UNWATCHED_RECHECK").is_ok_and(|v| v.trim() == "1")) +} +const STEADY_MAX_BYTES: usize = 4 << 20; +const STEADY_EVERY: u64 = 16; +/// the bytes the steady checks of one frame read at most (the first one is always made) +const STEADY_BUDGET: usize = 8 << 20; +/// the steady checks (whole-hash reads of a texture) of one frame at most +const STEADY_MAX_CHECKS: usize = 64; + +/// Frames (below `STEADY_EVERY`) by which the schedule of the entry of `res` is moved, so that +/// the entries seeded in one frame do not all come due together every `STEADY_EVERY` frames. +fn steady_stagger(res: usize) -> u64 { + ((res as u64).wrapping_mul(0x9E37_79B9_7F4A_7C15) >> 32) % STEADY_EVERY +} + +/// The `base_frame` of an entry made or reset at `frame`. +fn steady_base(res: usize, frame: u64, kept: bool) -> u64 { + if kept { frame + steady_stagger(res) } else { frame } +} + +/// Whether the unwatched texture at `src` is checked whole and for as long as it lives. +fn steady_keeps(src: usize, size: usize) -> bool { + steady_recheck() && size <= STEADY_MAX_BYTES && crate::gpu::uma::get().is_some_and(|u| u.in_committed_window(src, size)) +} + +/// The stage an entry starts at: a kept one (`steady_keeps`) past the milestones, so that all its +/// checks, which read all of it, come under the frame's budget. +fn first_stage(kept: bool) -> u8 { ~~~~ --- **High**: `first_stage(true)` starts kept entries past all milestones, so a kept texture is first rechecked 16 + stagger (16-31) frames after upload instead of at the 4- and 12-frame milestones it had before. With the switch on, if a texture is uploaded zeroed and the title streams its contents in 5 frames later, the PR used to catch it at frame 4/12 but now waits 16-31 frames plus any budget delay. At the 3.07 presents/s measured in run 404 that's 5-10 s of stale content, the late-streaming case the milestones exist for. Keeping the early milestones for kept entries, then switching to the steady interval, would keep both.
bmjask commented 2026-12-02 16:10:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T16:10:32Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 2533

@@ -2442,10 +2522,15 @@ unsafe fn recheck_streamed_unwatched_at(watched: &[(usize, usize)], frame: u64)
 
     let mut check = Vec::with_capacity(due.len());
     let mut prune = Vec::new();
+    let mut steady_due = Vec::new();
     {
         let t = TEXTURES.lock().unwrap();
-        for (res, prev_fp) in due {
+        for (res, prev_fp, steady) in due {
             match t.by_res.get(&res) {
+                // (`XCL_UNWATCHED_RECHECK`: the entry of a kept texture that is GPU-written stays
+                // if it is still here, but `publish_submission_effects` removes it when the
+                // texture becomes GPU-written, so this is not what keeps the checks going)
+                Some(e) if e.gpu_written && steady_keeps(e.src, e.tex.size() as usize) => {}

Medium: The new gpu_written && steady_keeps arm neither checks nor prunes the entry, so a GPU-written kept entry stays in STREAM_RECHECK for good with base_frame frozen, collected as due and looked up in TEXTURES every frame. Before the PR it was pruned. If publish_submission_effects removes the entry and seed_stream_recheck on another submit thread re-inserts it from a todo list built before gpu_written was set, it now leaks until forget(). If the download path later clears gpu_written, the old whole-hash baseline no longer matches and the texture is re-uploaded spuriously. Pruning it as before would fix both.

<!-- greyfinch-sync:ivall/xcl:review-comment:4772555358 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4772555358). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T16:10:32Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 2533 ~~~~diff @@ -2442,10 +2522,15 @@ unsafe fn recheck_streamed_unwatched_at(watched: &[(usize, usize)], frame: u64) let mut check = Vec::with_capacity(due.len()); let mut prune = Vec::new(); + let mut steady_due = Vec::new(); { let t = TEXTURES.lock().unwrap(); - for (res, prev_fp) in due { + for (res, prev_fp, steady) in due { match t.by_res.get(&res) { + // (`XCL_UNWATCHED_RECHECK`: the entry of a kept texture that is GPU-written stays + // if it is still here, but `publish_submission_effects` removes it when the + // texture becomes GPU-written, so this is not what keeps the checks going) + Some(e) if e.gpu_written && steady_keeps(e.src, e.tex.size() as usize) => {} ~~~~ --- **Medium**: The new `gpu_written && steady_keeps` arm neither checks nor prunes the entry, so a GPU-written kept entry stays in STREAM_RECHECK for good with `base_frame` frozen, collected as due and looked up in TEXTURES every frame. Before the PR it was pruned. If `publish_submission_effects` removes the entry and `seed_stream_recheck` on another submit thread re-inserts it from a todo list built before `gpu_written` was set, it now leaks until `forget()`. If the download path later clears `gpu_written`, the old whole-hash baseline no longer matches and the texture is re-uploaded spuriously. Pruning it as before would fix both.
bmjask commented 2026-12-02 16:10:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T16:10:32Z.

Review: COMMENTED


Review of c9283790: 2 finding(s) (1 high, 1 medium), most severe first.

  1. High crates/xcl/src/hle/d3d12x/title_textures.rs:2360: first_stage(true) starts kept entries past all milestones, so a kept texture is first rechecked 16 + stagger (16-31) frames after upload instead of at the 4- and 12-frame milestones it had before. (inline)
  2. Medium crates/xcl/src/hle/d3d12x/title_textures.rs:2533: The new gpu_written && steady_keeps arm neither checks nor prunes the entry, so a GPU-written kept entry stays in STREAM_RECHECK for good with base_frame frozen, collected as due and looked up in TEXTURES every frame. (inline)

These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6154611918 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#pullrequestreview-6154611918). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T16:10:32Z. **Review:** COMMENTED --- Review of `c9283790`: 2 finding(s) (1 high, 1 medium), most severe first. 1. **High** `crates/xcl/src/hle/d3d12x/title_textures.rs:2360`: `first_stage(true)` starts kept entries past all milestones, so a kept texture is first rechecked 16 + stagger (16-31) frames after upload instead of at the 4- and 12-frame milestones it had before. (inline) 2. **Medium** `crates/xcl/src/hle/d3d12x/title_textures.rs:2533`: The new `gpu_written && steady_keeps` arm neither checks nor prunes the entry, so a GPU-written kept entry stays in STREAM_RECHECK for good with `base_frame` frozen, collected as due and looked up in TEXTURES every frame. (inline) --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
bmjask commented 2026-12-02 16:10:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T16:10:34Z.


@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.

<!-- greyfinch-sync:ivall/xcl:comment:7351554412 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7351554412). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T16:10:34Z. --- @Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any.
stijn-boer commented 2026-12-02 16:47:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T16:47:03Z.


merge-check
base: 5eaadb54c1
head: c928379000
verdict: not yet: the workspace and retail smoke ended early on both builds. The changed GPU_UPLOAD path remains unverified on this host.

Windows / AMD RDNA4 (native D3D12) — workspace suite and retail smoke on c928379

Clean merge onto main at 5eaadb54 (merge commit db004a531a1a10e335aae3e1541b97092365c789). git diff --check was clean.

Setup

  • AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332
  • Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching d3d12SDKLayers.dll, DXC 1.9.2609.5

Tested

cargo build --workspace passed on both builds. cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output exited 101 on both.

Build Passed Failed Ignored SKIPPED notices
main 335 3 23 0
Merged PR 335 3 23 0

Counts are partial because two test processes aborted on each build.

  • Tests that failed on the PR and passed on main — none observed in the comparable results.
  • Test added by the PR — steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget passed in isolation.
  • Debug-layer coverage — both debug-layer E2E tests, including DRED, and uploads_start_from_each_subresources_state passed on both builds.
Shared failures and process aborts
  • fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs reported failures on both builds.
  • The library and gpu_compute_e2e test processes exited with 0xc0000409 on both builds.

Retail smoke

Ran scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary> with XCL_UMA_DRIVER=mixed for title hash 2c508222.

Build Exit Frames logged Device removals logged Peak commit
main 0xc0000409 None 0 1320 MB
Merged PR, XCL_UNWATCHED_RECHECK=0 0xc0000409 None 0 1320 MB
Merged PR, XCL_UNWATCHED_RECHECK=1 0xc0000409 None 0 1320 MB

Diff review

The isolated test covers scheduling and hashing. With the switch enabled, the initial whole-texture fingerprint runs before the periodic recheck budget applies. Neither merged smoke run logged recheck activity.

Not tested

Tests after the aborts and retail frame performance remain unverified. The smoke runs did not verify mixed GPU_UPLOAD re-upload or its performance.

AI use

Codex (GPT-6) ran the builds and tests, reviewed the diff, compared the results with main, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7352450480 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7352450480). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-02T16:47:03Z. --- merge-check base: 5eaadb54c14e0fc29597b2a1689d7dbd83491303 head: c92837900097f1495fe83b3ccb774eae151dbab8 verdict: not yet: the workspace and retail smoke ended early on both builds. The changed GPU_UPLOAD path remains unverified on this host. **Windows / AMD RDNA4 (native D3D12) — workspace suite and retail smoke on `c928379`** Clean merge onto `main` at `5eaadb54` (merge commit `db004a531a1a10e335aae3e1541b97092365c789`). `git diff --check` was clean. **Setup** - AMD Radeon RX 9060 XT (driver 32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332 - Rust 1.100.0, debug builds, Agility SDK 1.620.2 with matching `d3d12SDKLayers.dll`, DXC 1.9.2609.5 **Tested** `cargo build --workspace` passed on both builds. `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` exited 101 on both. | Build | Passed | Failed | Ignored | `SKIPPED` notices | |---|---:|---:|---:|---:| | `main` | 335 | 3 | 23 | 0 | | Merged PR | 335 | 3 | 23 | 0 | Counts are partial because two test processes aborted on each build. - **Tests that failed on the PR and passed on `main`** — none observed in the comparable results. - **Test added by the PR** — `steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget` passed in isolation. - **Debug-layer coverage** — both debug-layer E2E tests, including DRED, and `uploads_start_from_each_subresources_state` passed on both builds. <details><summary>Shared failures and process aborts</summary> - `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_3`, and `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` reported failures on both builds. - The library and `gpu_compute_e2e` test processes exited with `0xc0000409` on both builds. </details> **Retail smoke** Ran `scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary>` with `XCL_UMA_DRIVER=mixed` for title hash `2c508222`. | Build | Exit | Frames logged | Device removals logged | Peak commit | |---|---|---|---:|---:| | `main` | `0xc0000409` | None | 0 | 1320 MB | | Merged PR, `XCL_UNWATCHED_RECHECK=0` | `0xc0000409` | None | 0 | 1320 MB | | Merged PR, `XCL_UNWATCHED_RECHECK=1` | `0xc0000409` | None | 0 | 1320 MB | **Diff review** The isolated test covers scheduling and hashing. With the switch enabled, the initial whole-texture fingerprint runs before the periodic recheck budget applies. Neither merged smoke run logged recheck activity. **Not tested** Tests after the aborts and retail frame performance remain unverified. The smoke runs did not verify mixed `GPU_UPLOAD` re-upload or its performance. **AI use** Codex (GPT-6) ran the builds and tests, reviewed the diff, compared the results with `main`, and drafted this report.
ClosetPie107 commented 2026-12-02 17:13:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-12-02T17:13:23Z.


Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on c928379

Merged onto main 5eaadb54 (clean merge) and compared with main run twice on the same machine.

Setup

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.7)
  • Wine 11.23 (system), stock vkd3d-proton v3.1-83-gcae8353ed and DXVK dxgi.dll from GE-Proton11-16, DXC 1.9.2609.5
  • Debug build, cross-compiled for x86_64-pc-windows-msvc with cargo-xwin; test binaries run under Wine

Tested: cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>

passed failed ignored
main 5eaadb54 2769 177 52
this PR merged 2770 177 52
  • Tests that fail with this PR and pass on main: none.
  • Tests this PR adds: 1 of 1 pass (steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget).
About the failures on main and the 31 skipped tests (same for every PR in this batch)
  • Most of main's 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (d3d12_command_list_Reset: Invalid command allocator), and later tests get E_INVALIDARG (0x80070057). Running vkd3d-proton master with its vtable check taken out, hle::d3d12x::sparse::tests goes from 106 passed / 38 failed to 144 / 0.
  • The 31 skipped tests make vkd3d-proton's dxil-spirv call std::terminate() (Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests, gpu_compute_mode_dispatch_abi, gpu_compute_thread_limits_leave_the_lanes_past_them_out, the two gpu_mesh_mode_* tests, and console_wave64_compute_through_the_pso_hook_dispatch_and_read_back, plus serialize_root_signature_strips_console_flags_and_preserves_pc_flags, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (f8c1cae8, dxil-spirv 93ab44c5).
  • main was run twice: same counts, same failure set. SKIPPED lines (same as main): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1).

Not tested: Windows, NVIDIA, a retail title / scripts/smoke.ps1, a review of the diff. This is a test report, not a merge-check.

AI use: omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with main, and drafted this report. The user asked for it to be posted.

<!-- greyfinch-sync:ivall/xcl:comment:7353067426 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7353067426). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-12-02T17:13:23Z. --- **Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on `c928379`** Merged onto `main` `5eaadb54` (clean merge) and compared with `main` run twice on the same machine. **Setup** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.7) - Wine 11.23 (system), stock vkd3d-proton `v3.1-83-gcae8353ed` and DXVK `dxgi.dll` from GE-Proton11-16, DXC 1.9.2609.5 - Debug build, cross-compiled for `x86_64-pc-windows-msvc` with `cargo-xwin`; test binaries run under Wine **Tested:** `cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>` | | passed | failed | ignored | |---|---|---|---| | `main` `5eaadb54` | 2769 | 177 | 52 | | this PR merged | 2770 | 177 | 52 | - **Tests that fail with this PR and pass on `main`:** none. - **Tests this PR adds:** 1 of 1 pass (`steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget`). <details><summary>About the failures on <code>main</code> and the 31 skipped tests (same for every PR in this batch)</summary> - Most of `main`'s 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (`d3d12_command_list_Reset: Invalid command allocator`), and later tests get `E_INVALIDARG` (`0x80070057`). Running vkd3d-proton master with its vtable check taken out, `hle::d3d12x::sparse::tests` goes from 106 passed / 38 failed to 144 / 0. - The 31 skipped tests make vkd3d-proton's dxil-spirv call `std::terminate()` (`Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private`), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests, `gpu_compute_mode_dispatch_abi`, `gpu_compute_thread_limits_leave_the_lanes_past_them_out`, the two `gpu_mesh_mode_*` tests, and `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back`, plus `serialize_root_signature_strips_console_flags_and_preserves_pc_flags`, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (`f8c1cae8`, dxil-spirv `93ab44c5`). - `main` was run twice: same counts, same failure set. `SKIPPED` lines (same as `main`): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1). </details> **Not tested:** Windows, NVIDIA, a retail title / `scripts/smoke.ps1`, a review of the diff. This is a test report, not a `merge-check`. **AI use:** omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with `main`, and drafted this report. The user asked for it to be posted.
throny commented 2026-12-02 18:56:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-02T18:56:42Z.


@Foniass thanks for the review; everything is in 412e11e9 (rebased on main 817eb1fc):

  1. No read at seed time any more. A kept texture starts as Whole::Unknown. Its first whole hash is taken by the first budgeted check (8 MiB / 64 textures a frame), and until then the three slices are compared as on main. A hash taken by a check stays the baseline for the upload it queues, because it was read before that upload. The reads are still synchronous GPU copies, at most 64 a frame; the README says so now.
  2. Switch-on cost, measured at this head: a 900 s warm world run with XCL_UNWATCHED_RECHECK=1 gave 3.00 presents/s, no device removal, no crash (main on this machine: 3.0–3.2).
  3. Wiring tests: seed_stream_recheck_keeping(.., keeps) and keeps_whole(..) take the switch as an argument. The new test steady_recheck_keeps_small_unwatched_textures_past_the_milestones runs the real seed and recheck path. It covers no read at seed, the early milestones, survival past 400 frames, an 8 MiB texture retiring, a rewrite outside the slices being re-queued, and the download re-seed.
  4. Kept textures keep the 4/12/40/120/400 milestones; the 16-frame stagger applies only after the last one.
  5. The dead arm is gone. A download that clears gpu_written re-seeds the texture from the bytes it wrote, with nothing read.
  6. The README is rewritten: budget, first-check timing, ~N/64-frame period above ~1024 kept textures, synchronous reads, measured cost.

Known limits, now in the commit message: a write outside the three slices before a texture's first whole hash is missed, and so is a CPU write, made while the texture was GPU-written, to a subresource a later download didn't cover (main never re-checks those at all).

@stijn-boer the whole suite runs through at this head on an RTX 4080 (3006 passed, 0 failed), and both smoke runs finish (blocks in the description). If it still ends early on your machine, could you post the last lines of the log? Then I can see whether it's this PR.

Could you both re-check 412e11e9? An AMD check would help too (gpu:both).

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

<!-- greyfinch-sync:ivall/xcl:comment:7355388723 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7355388723). Originally posted by [throny](https://github.com/throny) on 2026-12-02T18:56:42Z. --- @Foniass thanks for the review; everything is in `412e11e9` (rebased on main `817eb1fc`): 1. **No read at seed time any more.** A kept texture starts as `Whole::Unknown`. Its first whole hash is taken by the first budgeted check (8 MiB / 64 textures a frame), and until then the three slices are compared as on main. A hash taken by a check stays the baseline for the upload it queues, because it was read before that upload. The reads are still synchronous GPU copies, at most 64 a frame; the README says so now. 2. **Switch-on cost, measured at this head:** a 900 s warm world run with `XCL_UNWATCHED_RECHECK=1` gave 3.00 presents/s, no device removal, no crash (main on this machine: 3.0–3.2). 3. **Wiring tests:** `seed_stream_recheck_keeping(.., keeps)` and `keeps_whole(..)` take the switch as an argument. The new test `steady_recheck_keeps_small_unwatched_textures_past_the_milestones` runs the real seed and recheck path. It covers no read at seed, the early milestones, survival past 400 frames, an 8 MiB texture retiring, a rewrite outside the slices being re-queued, and the download re-seed. 4. Kept textures keep the 4/12/40/120/400 milestones; the 16-frame stagger applies only after the last one. 5. The dead arm is gone. A download that clears `gpu_written` re-seeds the texture from the bytes it wrote, with nothing read. 6. The README is rewritten: budget, first-check timing, ~N/64-frame period above ~1024 kept textures, synchronous reads, measured cost. Known limits, now in the commit message: a write outside the three slices before a texture's first whole hash is missed, and so is a CPU write, made while the texture was GPU-written, to a subresource a later download didn't cover (main never re-checks those at all). @stijn-boer the whole suite runs through at this head on an RTX 4080 (3006 passed, 0 failed), and both smoke runs finish (blocks in the description). If it still ends early on your machine, could you post the last lines of the log? Then I can see whether it's this PR. Could you both re-check `412e11e9`? An AMD check would help too (`gpu:both`). *AI use: Claude Code (Claude Opus 5.5) made the changes, ran the tests and wrote this.*
bmjask commented 2026-12-02 19:09:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T19:09:41Z.

Review: COMMENTED


Review of 412e11e9: 4 finding(s) (1 high, 3 medium), most severe first.

  1. High crates/xcl/src/hle/d3d12x/title_textures.rs:2489: A kept texture is seeded as Whole::Unknown and gets its first whole hash only at a later check, after the upload has already read it. (inline)
  2. Medium crates/xcl/src/hle/d3d12x/title_textures.rs:2597: steady_waiting removes deferred kept entries from check entirely and orders by base_frame, so milestone and Unknown checks of freshly uploaded kept textures wait behind steady polls of older ones and get no slice comparison meanwhile. (inline)
  3. Medium crates/xcl/src/hle/d3d12x/title_textures.rs:4209: reseed_downloaded doesn't check entry.cpu_backed, so GPU-owned placements (from register_gpu_owned) that get downloaded are put under the recheck. (inline)
  4. Medium crates/xcl/src/hle/d3d12x/title_textures.rs:4207: publish_download drops the TEXTURES lock before reseed_downloaded inserts into STREAM_RECHECK, so a concurrent forget or register on the same raw resource pointer can run in between and the stale entry gets inserted afterwards. (inline)

These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6157125583 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#pullrequestreview-6157125583). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T19:09:41Z. **Review:** COMMENTED --- Review of `412e11e9`: 4 finding(s) (1 high, 3 medium), most severe first. 1. **High** `crates/xcl/src/hle/d3d12x/title_textures.rs:2489`: A kept texture is seeded as `Whole::Unknown` and gets its first whole hash only at a later check, after the upload has already read it. (inline) 2. **Medium** `crates/xcl/src/hle/d3d12x/title_textures.rs:2597`: `steady_waiting` removes deferred kept entries from `check` entirely and orders by `base_frame`, so milestone and Unknown checks of freshly uploaded kept textures wait behind steady polls of older ones and get no slice comparison meanwhile. (inline) 3. **Medium** `crates/xcl/src/hle/d3d12x/title_textures.rs:4209`: `reseed_downloaded` doesn't check `entry.cpu_backed`, so GPU-owned placements (from `register_gpu_owned`) that get downloaded are put under the recheck. (inline) 4. **Medium** `crates/xcl/src/hle/d3d12x/title_textures.rs:4207`: `publish_download` drops the TEXTURES lock before `reseed_downloaded` inserts into STREAM_RECHECK, so a concurrent `forget` or `register` on the same raw resource pointer can run in between and the stale entry gets inserted afterwards. (inline) --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
bmjask commented 2026-12-02 19:09:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T19:09:41Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 2489

@@ -2394,24 +2486,52 @@ unsafe fn seed_stream_recheck(todo: &[Due], watched: &[(usize, usize)], frame: u
         // partial upload would keep a texture written every few frames from reaching a milestone).
         // A texture with no entry (retired, pruned, never seeded) gets one without a baseline, so
         // its first milestone queues the whole upload that sets one.
+        let whole = if keeps(d.src, size) { Whole::Unknown } else { Whole::No };

High: A kept texture is seeded as Whole::Unknown and gets its first whole hash only at a later check, after the upload has already read it. So a write landing between the upload's read and that first check, outside the three 16 KiB slices, becomes part of the baseline and is never uploaded. A glyph atlas in GPU_UPLOAD memory goes up whole at frame F, and at F+0.5 the title writes a glyph at offset 100 KiB. At F+1 (or many frames later if the budget defers it), the check hashes the bytes with the glyph, the slices still match last_fp so differs is false, and st.whole = Hash(cur) becomes the baseline. The PC texture never gets the glyph: the missing-letter bug this switch exists to fix, with a window that grows under budget pressure. Taking the whole hash from the bytes the upload actually read would close it.

<!-- greyfinch-sync:ivall/xcl:review-comment:4774547022 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4774547022). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T19:09:41Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 2489 ~~~~diff @@ -2394,24 +2486,52 @@ unsafe fn seed_stream_recheck(todo: &[Due], watched: &[(usize, usize)], frame: u // partial upload would keep a texture written every few frames from reaching a milestone). // A texture with no entry (retired, pruned, never seeded) gets one without a baseline, so // its first milestone queues the whole upload that sets one. + let whole = if keeps(d.src, size) { Whole::Unknown } else { Whole::No }; ~~~~ --- **High**: A kept texture is seeded as `Whole::Unknown` and gets its first whole hash only at a later check, after the upload has already read it. So a write landing between the upload's read and that first check, outside the three 16 KiB slices, becomes part of the baseline and is never uploaded. A glyph atlas in GPU_UPLOAD memory goes up whole at frame F, and at F+0.5 the title writes a glyph at offset 100 KiB. At F+1 (or many frames later if the budget defers it), the check hashes the bytes with the glyph, the slices still match `last_fp` so `differs` is false, and `st.whole = Hash(cur)` becomes the baseline. The PC texture never gets the glyph: the missing-letter bug this switch exists to fix, with a window that grows under budget pressure. Taking the whole hash from the bytes the upload actually read would close it.
bmjask commented 2026-12-02 19:09:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T19:09:41Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 2597

@@ -2472,29 +2592,64 @@ unsafe fn recheck_streamed_unwatched_at(watched: &[(usize, usize)], frame: u64)
             g.remove(&res);
         }
     }
+    if !steady_due.is_empty() {
+        let waiting = steady_waiting(steady_due, STEADY_BUDGET, STEADY_MAX_CHECKS);
+        check.retain(|c| !waiting.contains(&c.0));

Medium: steady_waiting removes deferred kept entries from check entirely and orders by base_frame, so milestone and Unknown checks of freshly uploaded kept textures wait behind steady polls of older ones and get no slice comparison meanwhile. The README and the enum comment both say 'its slices compared meanwhile'. With the switch on and enough kept textures that 64 or more steady checks are due every frame, a texture uploaded at frame F loses its Unknown/4-frame milestone check every frame until older entries drain. Streaming mip writes that the switch-off path catches by slices at F+4 then go undetected for many frames. Running milestone checks ahead of steady polls, or falling back to a slice check for deferred entries, would keep the documented behaviour.

<!-- greyfinch-sync:ivall/xcl:review-comment:4774547032 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4774547032). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T19:09:41Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 2597 ~~~~diff @@ -2472,29 +2592,64 @@ unsafe fn recheck_streamed_unwatched_at(watched: &[(usize, usize)], frame: u64) g.remove(&res); } } + if !steady_due.is_empty() { + let waiting = steady_waiting(steady_due, STEADY_BUDGET, STEADY_MAX_CHECKS); + check.retain(|c| !waiting.contains(&c.0)); ~~~~ --- **Medium**: `steady_waiting` removes deferred kept entries from `check` entirely and orders by `base_frame`, so milestone and Unknown checks of freshly uploaded kept textures wait behind steady polls of older ones and get no slice comparison meanwhile. The README and the enum comment both say 'its slices compared meanwhile'. With the switch on and enough kept textures that 64 or more steady checks are due every frame, a texture uploaded at frame F loses its Unknown/4-frame milestone check every frame until older entries drain. Streaming mip writes that the switch-off path catches by slices at F+4 then go undetected for many frames. Running milestone checks ahead of steady polls, or falling back to a slice check for deferred entries, would keep the documented behaviour.
bmjask commented 2026-12-02 19:09:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T19:09:41Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 4209

@@ -4039,6 +4202,12 @@ fn publish_download(download: &ReadyDownload) -> Result<bool, String> {
     if entry.gpu_writers.iter().all(Option::is_none) {
         entry.gpu_writers.clear();
         entry.gpu_written = false;
+        // (`XCL_UNWATCHED_RECHECK`: its checks, which stopped when the GPU wrote it, start again)
+        let (src, paged) = (entry.src, entry.paged);
+        drop(table);
+        if !paged {
+            reseed_downloaded(download.res, &console, steady_keeps(src, console.len()));

Medium: reseed_downloaded doesn't check entry.cpu_backed, so GPU-owned placements (from register_gpu_owned) that get downloaded are put under the recheck. When their hash differs, the recheck sets e.pending = true and PENDING += 1 on a texture that texture_needs_upload(false, ..) never selects. Take a small render target or UAV (≤ 4 MiB) in the committed window that is GPU-written and then downloaded (publish_download reseeds it) and later touched by the CPU. Its e.pending stays true for good, PENDING never returns to 0, the dirty_len == 0 && PENDING == 0 fast path is off on every later submit, and the recheck skips the entry forever. Skipping entries that aren't cpu_backed would fix it.

<!-- greyfinch-sync:ivall/xcl:review-comment:4774547048 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4774547048). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T19:09:41Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 4209 ~~~~diff @@ -4039,6 +4202,12 @@ fn publish_download(download: &ReadyDownload) -> Result<bool, String> { if entry.gpu_writers.iter().all(Option::is_none) { entry.gpu_writers.clear(); entry.gpu_written = false; + // (`XCL_UNWATCHED_RECHECK`: its checks, which stopped when the GPU wrote it, start again) + let (src, paged) = (entry.src, entry.paged); + drop(table); + if !paged { + reseed_downloaded(download.res, &console, steady_keeps(src, console.len())); ~~~~ --- **Medium**: `reseed_downloaded` doesn't check `entry.cpu_backed`, so GPU-owned placements (from `register_gpu_owned`) that get downloaded are put under the recheck. When their hash differs, the recheck sets `e.pending = true` and `PENDING += 1` on a texture that `texture_needs_upload(false, ..)` never selects. Take a small render target or UAV (≤ 4 MiB) in the committed window that is GPU-written and then downloaded (`publish_download` reseeds it) and later touched by the CPU. Its `e.pending` stays true for good, PENDING never returns to 0, the `dirty_len == 0 && PENDING == 0` fast path is off on every later submit, and the recheck skips the entry forever. Skipping entries that aren't `cpu_backed` would fix it.
bmjask commented 2026-12-02 19:09:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T19:09:41Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 4207

@@ -4039,6 +4202,12 @@ fn publish_download(download: &ReadyDownload) -> Result<bool, String> {
     if entry.gpu_writers.iter().all(Option::is_none) {
         entry.gpu_writers.clear();
         entry.gpu_written = false;
+        // (`XCL_UNWATCHED_RECHECK`: its checks, which stopped when the GPU wrote it, start again)
+        let (src, paged) = (entry.src, entry.paged);
+        drop(table);

Medium: publish_download drops the TEXTURES lock before reseed_downloaded inserts into STREAM_RECHECK, so a concurrent forget or register on the same raw resource pointer can run in between and the stale entry gets inserted afterwards. Thread A clears gpu_written and drops the table. Thread B releases the resource (forget removes the recheck entry) and a new texture is registered at the same address. A then inserts the old resource's console-bytes hash for the new texture, whose first check compares against another texture's hash, giving a spurious upload or a recheck entry on a GPU-owned replacement. Doing the insert while TEXTURES is still held (or re-checking the entry's identity) would close the window.

<!-- greyfinch-sync:ivall/xcl:review-comment:4774547062 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4774547062). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T19:09:41Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 4207 ~~~~diff @@ -4039,6 +4202,12 @@ fn publish_download(download: &ReadyDownload) -> Result<bool, String> { if entry.gpu_writers.iter().all(Option::is_none) { entry.gpu_writers.clear(); entry.gpu_written = false; + // (`XCL_UNWATCHED_RECHECK`: its checks, which stopped when the GPU wrote it, start again) + let (src, paged) = (entry.src, entry.paged); + drop(table); ~~~~ --- **Medium**: `publish_download` drops the TEXTURES lock before `reseed_downloaded` inserts into STREAM_RECHECK, so a concurrent `forget` or `register` on the same raw resource pointer can run in between and the stale entry gets inserted afterwards. Thread A clears `gpu_written` and drops the table. Thread B releases the resource (`forget` removes the recheck entry) and a new texture is registered at the same address. A then inserts the old resource's console-bytes hash for the new texture, whose first check compares against another texture's hash, giving a spurious upload or a recheck entry on a GPU-owned replacement. Doing the insert while TEXTURES is still held (or re-checking the entry's identity) would close the window.
throny commented 2026-12-02 21:38:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-02T21:38:50Z.


Thanks. All four were real; they are fixed in 7783f9b6, which is amended into the PR's single commit. The commit message and README now describe the new behaviour.

  1. High: a write between the upload's read and the first whole hash was never uploaded. Fixed. The upload already keeps a hash of each page it read (Known, written by Hashes::note in fill). The first whole check of a Whole::Unknown entry now compares the texture's pages with those hashes in the same read, through texture_upload::differs_from_sent (texture_upload.rs:137) and whole_check (title_textures.rs:2418). A difference queues the texture, and the hash taken there becomes the baseline of that upload (title_textures.rs:2593, differs just below line 2648). The texture is not read again at seed time. One case is left: a page the upload read only in part, where row reads of a linear texture end inside a page, has no hash. A write there is still caught only if it falls in the slices. The commit message says so. Tests: bytes_are_compared_with_what_the_last_upload_read (texture_upload.rs:963), and a new part of steady_recheck_keeps_small_unwatched_textures_past_the_milestones (title_textures.rs:7042) that writes outside the slices after the upload's read and expects the texture to be queued. That part fails without the fix.

  2. Medium: deferred checks of fresh kept textures waited behind steady polls, with no slice comparison. Fixed. steady_waiting now sorts checks still at their milestones ahead of the steady polls (title_textures.rs:2392). A deferred check that is at a milestone (at_milestone, line 2405) is still made by its slices, as with the switch off (lines 2615 and 2648). A change there queues the texture and resets its whole hash to Unknown, because the old hash is not a baseline for the upload that follows. A match advances the stage. A deferred steady poll still just waits. Test: the ordering and at_milestone cases added to steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget (line 6866).

  3. Medium: reseed_downloaded put GPU-owned placements under the recheck. Fixed. reseed_downloaded now takes the entry and does nothing for one that is not cpu_backed or is paged (title_textures.rs:2539). The test re-seeds the texture with cpu_backed false, then with cpu_backed true but not kept, and expects no recheck entry in either case.

  4. Medium: lock gap in publish_download. Fixed. The re-seed now runs while TEXTURES is held, right after download_current checks the entry's generation and address (title_textures.rs:4240). A texture that is released or registered at the same address cannot come in between. If a concurrent forget removes the recheck entry before the insert, the leftover entry has no texture behind it, and the next recheck prunes it as on main. A register at that address removes it first. No code path locks TEXTURES while it holds STREAM_RECHECK, so the new lock order (TEXTURES first, then STREAM_RECHECK) cannot deadlock. This race is not covered by a test.

Tested on an RTX 4080 (debug build) with cargo build --workspace (ok) and cargo test -p xcl --lib title_textures: 67 passed, 0 failed, 1 ignored. cargo test -p xcl --lib texture_upload: 11 passed, 1 failed. The failure is an_upload_reads_pages_kept_apart, which also fails at 412e11e9 without these changes on this machine. It is not related to this PR. The whole suite was not run.

Pushed as 7783f9b6. The whole suite passes there (see the description), and the smoke blocks are updated. @bmjask could you re-check?

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7359577405 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7359577405). Originally posted by [throny](https://github.com/throny) on 2026-12-02T21:38:50Z. --- Thanks. All four were real; they are fixed in `7783f9b6`, which is amended into the PR's single commit. The commit message and README now describe the new behaviour. 1. **High: a write between the upload's read and the first whole hash was never uploaded.** Fixed. The upload already keeps a hash of each page it read (`Known`, written by `Hashes::note` in `fill`). The first whole check of a `Whole::Unknown` entry now compares the texture's pages with those hashes in the same read, through `texture_upload::differs_from_sent` (`texture_upload.rs:137`) and `whole_check` (`title_textures.rs:2418`). A difference queues the texture, and the hash taken there becomes the baseline of that upload (`title_textures.rs:2593`, `differs` just below line 2648). The texture is not read again at seed time. One case is left: a page the upload read only in part, where row reads of a linear texture end inside a page, has no hash. A write there is still caught only if it falls in the slices. The commit message says so. Tests: `bytes_are_compared_with_what_the_last_upload_read` (`texture_upload.rs:963`), and a new part of `steady_recheck_keeps_small_unwatched_textures_past_the_milestones` (`title_textures.rs:7042`) that writes outside the slices after the upload's read and expects the texture to be queued. That part fails without the fix. 2. **Medium: deferred checks of fresh kept textures waited behind steady polls, with no slice comparison.** Fixed. `steady_waiting` now sorts checks still at their milestones ahead of the steady polls (`title_textures.rs:2392`). A deferred check that is at a milestone (`at_milestone`, line 2405) is still made by its slices, as with the switch off (lines 2615 and 2648). A change there queues the texture and resets its whole hash to `Unknown`, because the old hash is not a baseline for the upload that follows. A match advances the stage. A deferred steady poll still just waits. Test: the ordering and `at_milestone` cases added to `steady_rechecks_follow_the_milestones_and_keep_to_the_frame_budget` (line 6866). 3. **Medium: `reseed_downloaded` put GPU-owned placements under the recheck.** Fixed. `reseed_downloaded` now takes the entry and does nothing for one that is not `cpu_backed` or is paged (`title_textures.rs:2539`). The test re-seeds the texture with `cpu_backed` false, then with `cpu_backed` true but not kept, and expects no recheck entry in either case. 4. **Medium: lock gap in `publish_download`.** Fixed. The re-seed now runs while `TEXTURES` is held, right after `download_current` checks the entry's generation and address (`title_textures.rs:4240`). A texture that is released or registered at the same address cannot come in between. If a concurrent `forget` removes the recheck entry before the insert, the leftover entry has no texture behind it, and the next recheck prunes it as on main. A `register` at that address removes it first. No code path locks `TEXTURES` while it holds `STREAM_RECHECK`, so the new lock order (`TEXTURES` first, then `STREAM_RECHECK`) cannot deadlock. This race is not covered by a test. Tested on an RTX 4080 (debug build) with `cargo build --workspace` (ok) and `cargo test -p xcl --lib title_textures`: 67 passed, 0 failed, 1 ignored. `cargo test -p xcl --lib texture_upload`: 11 passed, 1 failed. The failure is `an_upload_reads_pages_kept_apart`, which also fails at `412e11e9` without these changes on this machine. It is not related to this PR. The whole suite was not run. Pushed as `7783f9b6`. The whole suite passes there (see the description), and the smoke blocks are updated. @bmjask could you re-check? *AI use: Claude Code (Claude Opus 5.5).*
bmjask commented 2026-12-02 22:10:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T22:10:00Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 2676

@@ -2472,29 +2610,78 @@ unsafe fn recheck_streamed_unwatched_at(watched: &[(usize, usize)], frame: u64)
             g.remove(&res);
         }
     }
+    // (the whole checks that wait for a later frame: one at a milestone is compared by its slices
+    // meanwhile, as with the switch off; the others just wait)
+    let waiting = if steady_due.is_empty() { Default::default() } else { steady_waiting(steady_due, STEADY_BUDGET, STEADY_MAX_CHECKS) };
+    check.retain(|c| !waiting.contains(&c.0) || at_milestone(&c.3, frame));
     if check.is_empty() {
         return;
     }
 
-    let results: Vec<(usize, Option<u64>, u64)> = check
+    // (the hash of all of a kept one, the slices' fingerprint, and whether a page differs from what
+    // the upload read; nothing for a kept one with no baseline, which goes up whole anyway)
+    let results: Vec<(usize, StreamRecheck, Option<(Option<u64>, u64, bool)>, bool)> = check
         .into_iter()
-        .map(|(res, src, size, prev_fp)| (res, prev_fp, sample_fingerprint(src, size)))
+        .map(|(res, src, size, seen, known)| {
+            let slices_only = waiting.contains(&res);
+            let now = match seen.whole {
+                _ if slices_only => Some((None, sample_fingerprint(src, size), false)),
+                Whole::No => Some((None, sample_fingerprint(src, size), false)),
+                _ if seen.last_fp.is_none() => None,
+                _ => {
+                    let (whole, sample, read_differs) = whole_check(src, size, known.as_ref());
+                    Some((Some(whole), sample, read_differs))
+                }
+            };
+            (res, seen, now, slices_only)
+        })
         .collect();
 
     let mut changed = Vec::new();
     {
         let mut g = STREAM_RECHECK.lock().unwrap();
-        for (res, prev_fp, cur_fp) in results {
+        let last = STREAM_RECHECK_MILESTONES.len() as u8;
+        for (res, seen, now, slices_only) in results {
             let Some(st) = g.get_mut(&res) else {
                 continue;
             };
-            // (an entry without a baseline is always queued)
-            if prev_fp != Some(cur_fp) {
-                *st = StreamRecheck { base_frame: frame, stage: 0, last_fp: Some(cur_fp) };
+            if slices_only {
+                // (a whole check that waits, at a milestone: a change of the slices queues it, and
+                // a hash of all of it from before is no baseline for the upload that follows)
+                let sample = now.map(|n| n.1);
+                if sample != seen.last_fp {
+                    *st = StreamRecheck { base_frame: frame, stage: 0, last_fp: sample, whole: Whole::Unknown };
+                    changed.push(res);
+                } else {
+                    st.stage = st.stage.saturating_add(1).min(last);
+                }
+                continue;
+            }
+            // (an entry without a baseline is always queued; a kept one with no hash of all of it
+            // yet is compared by its slices and by what its upload read of its pages)
+            let differs = match (seen.whole, now) {
+                (_, None) => true,
+                (Whole::Hash(h), Some((Some(cur), _, _))) => h != cur,
+                (_, Some((_, sample, read_differs))) => read_differs || seen.last_fp != Some(sample),
+            };
+            let whole = match now {
+                Some((Some(cur), _, _)) => Whole::Hash(cur),
+                _ => seen.whole,
+            };
+            if differs {
+                *st = StreamRecheck { base_frame: frame, stage: 0, last_fp: now.map(|n| n.1), whole };
                 changed.push(res);
+            } else if seen.whole == Whole::Unknown {
+                // (the first hash of all of a kept one: its baseline, the schedule stays)
+                st.whole = whole;

High: The first whole-hash check of a Whole::Unknown entry still takes the current memory as its baseline, and its only guard against writes made after the upload read the texture is differs_from_sent, which returns false whenever the upload recorded no page hashes. So such a write is folded into the baseline and never uploaded. That happens when unmapped lazy levels make the upload call texture_upload::unknown() (hashes cleared), when forgotten changed during fill, or when the write lands on a partial edge page (hash 0). If the title then writes a glyph outside the three 16 KiB slices before the next frame's check, the slices match, st.whole = Hash(current) becomes the baseline, and the PC texture keeps the old atlas: the failure this PR sets out to fix. Treating 'no page hashes' as 'differs' (forcing one more whole upload) would close it.

<!-- greyfinch-sync:ivall/xcl:review-comment:4776802084 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4776802084). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T22:10:00Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 2676 ~~~~diff @@ -2472,29 +2610,78 @@ unsafe fn recheck_streamed_unwatched_at(watched: &[(usize, usize)], frame: u64) g.remove(&res); } } + // (the whole checks that wait for a later frame: one at a milestone is compared by its slices + // meanwhile, as with the switch off; the others just wait) + let waiting = if steady_due.is_empty() { Default::default() } else { steady_waiting(steady_due, STEADY_BUDGET, STEADY_MAX_CHECKS) }; + check.retain(|c| !waiting.contains(&c.0) || at_milestone(&c.3, frame)); if check.is_empty() { return; } - let results: Vec<(usize, Option<u64>, u64)> = check + // (the hash of all of a kept one, the slices' fingerprint, and whether a page differs from what + // the upload read; nothing for a kept one with no baseline, which goes up whole anyway) + let results: Vec<(usize, StreamRecheck, Option<(Option<u64>, u64, bool)>, bool)> = check .into_iter() - .map(|(res, src, size, prev_fp)| (res, prev_fp, sample_fingerprint(src, size))) + .map(|(res, src, size, seen, known)| { + let slices_only = waiting.contains(&res); + let now = match seen.whole { + _ if slices_only => Some((None, sample_fingerprint(src, size), false)), + Whole::No => Some((None, sample_fingerprint(src, size), false)), + _ if seen.last_fp.is_none() => None, + _ => { + let (whole, sample, read_differs) = whole_check(src, size, known.as_ref()); + Some((Some(whole), sample, read_differs)) + } + }; + (res, seen, now, slices_only) + }) .collect(); let mut changed = Vec::new(); { let mut g = STREAM_RECHECK.lock().unwrap(); - for (res, prev_fp, cur_fp) in results { + let last = STREAM_RECHECK_MILESTONES.len() as u8; + for (res, seen, now, slices_only) in results { let Some(st) = g.get_mut(&res) else { continue; }; - // (an entry without a baseline is always queued) - if prev_fp != Some(cur_fp) { - *st = StreamRecheck { base_frame: frame, stage: 0, last_fp: Some(cur_fp) }; + if slices_only { + // (a whole check that waits, at a milestone: a change of the slices queues it, and + // a hash of all of it from before is no baseline for the upload that follows) + let sample = now.map(|n| n.1); + if sample != seen.last_fp { + *st = StreamRecheck { base_frame: frame, stage: 0, last_fp: sample, whole: Whole::Unknown }; + changed.push(res); + } else { + st.stage = st.stage.saturating_add(1).min(last); + } + continue; + } + // (an entry without a baseline is always queued; a kept one with no hash of all of it + // yet is compared by its slices and by what its upload read of its pages) + let differs = match (seen.whole, now) { + (_, None) => true, + (Whole::Hash(h), Some((Some(cur), _, _))) => h != cur, + (_, Some((_, sample, read_differs))) => read_differs || seen.last_fp != Some(sample), + }; + let whole = match now { + Some((Some(cur), _, _)) => Whole::Hash(cur), + _ => seen.whole, + }; + if differs { + *st = StreamRecheck { base_frame: frame, stage: 0, last_fp: now.map(|n| n.1), whole }; changed.push(res); + } else if seen.whole == Whole::Unknown { + // (the first hash of all of a kept one: its baseline, the schedule stays) + st.whole = whole; ~~~~ --- **High**: The first whole-hash check of a `Whole::Unknown` entry still takes the current memory as its baseline, and its only guard against writes made after the upload read the texture is `differs_from_sent`, which returns false whenever the upload recorded no page hashes. So such a write is folded into the baseline and never uploaded. That happens when `unmapped` lazy levels make the upload call `texture_upload::unknown()` (hashes cleared), when `forgotten` changed during `fill`, or when the write lands on a partial edge page (hash 0). If the title then writes a glyph outside the three 16 KiB slices before the next frame's check, the slices match, `st.whole = Hash(current)` becomes the baseline, and the PC texture keeps the old atlas: the failure this PR sets out to fix. Treating 'no page hashes' as 'differs' (forcing one more whole upload) would close it.
bmjask commented 2026-12-02 22:10:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T22:10:00Z.

Review: COMMENTED


Review of 7783f9b6: 3 finding(s) (2 high, 1 medium), most severe first.

Re-review at 7783f9b6. From the 412e11e9 review, the stuck PENDING on GPU-owned textures and the reseed race on reused addresses weren't flagged again. The baseline-after-upload gap is narrowed by differs_from_sent but still open in the case below, and milestone checks can still be starved under sustained streaming. Two new items.

  1. High crates/xcl/src/hle/d3d12x/title_textures.rs:2676: The first whole-hash check of a Whole::Unknown entry still takes the current memory as its baseline, and its only guard against writes made after the upload read the texture is differs_from_sent, which returns false whenever the uplo.... (inline)
  2. High crates/xcl/src/hle/d3d12x/title_textures.rs:2525: On a whole upload, seed_stream_recheck keeps an existing Whole::Hash(h) even when the check that took h didn't trigger this upload, so the baseline can be arbitrarily old: from a check 16+ frames ago, a reseed_downloaded, or the me.... (inline)
  3. Medium crates/xcl/src/hle/d3d12x/title_textures.rs:2556: see below.

On lines outside the diff:

  1. Medium crates/xcl/src/hle/d3d12x/title_textures.rs:2556: LAST_RECHECK_FRAME.swap only stops two calls for the same frame. Since the recheck can now do up to 64 GPU readbacks one after another (each waiting up to 5 s on a fence), passes for frames F and F+1 from two submitting threads can overlap, and both write the same STREAM_RECHECK entries from stale seen snapshots. If thread A is still reading for frame F when B starts F+1, both snapshot entry X and both run st.stage += 1, so X skips a milestone. Or one pass writes whole: Hash(cur_old) over an entry that seed_stream_recheck/reseed_downloaded refreshed in between, replacing the fresh baseline with one read before the upload. Holding a recheck-in-progress flag (or re-validating each entry's generation before writing) would prevent the overlap.

These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it.

<!-- greyfinch-sync:ivall/xcl:review:6159916472 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#pullrequestreview-6159916472). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T22:10:00Z. **Review:** COMMENTED --- Review of `7783f9b6`: 3 finding(s) (2 high, 1 medium), most severe first. Re-review at `7783f9b6`. From the `412e11e9` review, the stuck PENDING on GPU-owned textures and the reseed race on reused addresses weren't flagged again. The baseline-after-upload gap is narrowed by `differs_from_sent` but still open in the case below, and milestone checks can still be starved under sustained streaming. Two new items. 1. **High** `crates/xcl/src/hle/d3d12x/title_textures.rs:2676`: The first whole-hash check of a `Whole::Unknown` entry still takes the current memory as its baseline, and its only guard against writes made after the upload read the texture is `differs_from_sent`, which returns false whenever the uplo.... (inline) 2. **High** `crates/xcl/src/hle/d3d12x/title_textures.rs:2525`: On a whole upload, `seed_stream_recheck` keeps an existing `Whole::Hash(h)` even when the check that took h didn't trigger this upload, so the baseline can be arbitrarily old: from a check 16+ frames ago, a `reseed_downloaded`, or the me.... (inline) 3. **Medium** `crates/xcl/src/hle/d3d12x/title_textures.rs:2556`: see below. **On lines outside the diff:** 3. **Medium** `crates/xcl/src/hle/d3d12x/title_textures.rs:2556`: `LAST_RECHECK_FRAME.swap` only stops two calls for the same frame. Since the recheck can now do up to 64 GPU readbacks one after another (each waiting up to 5 s on a fence), passes for frames F and F+1 from two submitting threads can overlap, and both write the same STREAM_RECHECK entries from stale `seen` snapshots. If thread A is still reading for frame F when B starts F+1, both snapshot entry X and both run `st.stage += 1`, so X skips a milestone. Or one pass writes `whole: Hash(cur_old)` over an entry that `seed_stream_recheck`/`reseed_downloaded` refreshed in between, replacing the fresh baseline with one read before the upload. Holding a recheck-in-progress flag (or re-validating each entry's generation before writing) would prevent the overlap. --- _These findings come from an AI-assisted review (Claude Code) and focus on correctness. Each is a candidate; please check it before acting on it._
bmjask commented 2026-12-02 22:10:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-12-02T22:10:01Z.

Code review location: crates/xcl/src/hle/d3d12x/title_textures.rs; line 2525

@@ -2394,24 +2501,53 @@ unsafe fn seed_stream_recheck(todo: &[Due], watched: &[(usize, usize)], frame: u
         // partial upload would keep a texture written every few frames from reaching a milestone).
         // A texture with no entry (retired, pruned, never seeded) gets one without a baseline, so
         // its first milestone queues the whole upload that sets one.
+        let whole = if keeps(d.src, size) { Whole::Unknown } else { Whole::No };
         if !d.whole {
-            unsent.push(d.res.as_raw() as usize);
+            unsent.push((d.res.as_raw() as usize, whole));
             continue;
         }
+        if whole != Whole::No {
+            static KEPT: AtomicU64 = AtomicU64::new(0);
+            let n = KEPT.fetch_add(1, Ordering::Relaxed) + 1;
+            if n == 1 || (n.is_power_of_two() && n >= 16) {
+                crate::xlog_info!("D3D12.X: XCL_UNWATCHED_RECHECK: {n} uploads of textures in unwatched video memory so far: each is checked whole, then every {STEADY_EVERY} frames after its last milestone ({} MiB and {STEADY_MAX_CHECKS} textures a frame at most)", STEADY_BUDGET >> 20);
+            }
+        }
         let fp = sample_fingerprint(d.src, size);
-        seeded.push((d.res.as_raw() as usize, StreamRecheck { base_frame: frame, stage: 0, last_fp: Some(fp) }));
+        seeded.push((d.res.as_raw() as usize, StreamRecheck { base_frame: frame, stage: 0, last_fp: Some(fp), whole }));
     }
     if !seeded.is_empty() || !unsent.is_empty() {
         let mut g = STREAM_RECHECK.lock().unwrap();
-        for (res, state) in seeded {
+        for (res, mut state) in seeded {
+            // (a kept texture keeps the hash of all of it that a check took before this upload read
+            // it: a write since then is still a change, and nothing is read here)
+            if let (Whole::Unknown, Some(Whole::Hash(h))) = (state.whole, g.get(&res).map(|s| s.whole)) {
+                state.whole = Whole::Hash(h);

High: On a whole upload, seed_stream_recheck keeps an existing Whole::Hash(h) even when the check that took h didn't trigger this upload, so the baseline can be arbitrarily old: from a check 16+ frames ago, a reseed_downloaded, or the memory at the previous e.src. In an A-B-A sequence, where the title writes C0 -> C1 (uploaded) -> C0 (e.g. an atlas cleared back to its initial state), the steady check sees hash == h(C0) and reports no change, so the PC texture keeps C1 while memory holds C0. When recheck_source moves e.src or a texture is re-queued, the stale h also causes a redundant whole upload. Resetting the baseline to the uploaded content (or to Unknown) on every whole upload would fix both.

<!-- greyfinch-sync:ivall/xcl:review-comment:4776802098 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#discussion_r4776802098). Originally posted by [bmjask](https://github.com/bmjask) on 2026-12-02T22:10:01Z. **Code review location:** `crates/xcl/src/hle/d3d12x/title_textures.rs`; line 2525 ~~~~diff @@ -2394,24 +2501,53 @@ unsafe fn seed_stream_recheck(todo: &[Due], watched: &[(usize, usize)], frame: u // partial upload would keep a texture written every few frames from reaching a milestone). // A texture with no entry (retired, pruned, never seeded) gets one without a baseline, so // its first milestone queues the whole upload that sets one. + let whole = if keeps(d.src, size) { Whole::Unknown } else { Whole::No }; if !d.whole { - unsent.push(d.res.as_raw() as usize); + unsent.push((d.res.as_raw() as usize, whole)); continue; } + if whole != Whole::No { + static KEPT: AtomicU64 = AtomicU64::new(0); + let n = KEPT.fetch_add(1, Ordering::Relaxed) + 1; + if n == 1 || (n.is_power_of_two() && n >= 16) { + crate::xlog_info!("D3D12.X: XCL_UNWATCHED_RECHECK: {n} uploads of textures in unwatched video memory so far: each is checked whole, then every {STEADY_EVERY} frames after its last milestone ({} MiB and {STEADY_MAX_CHECKS} textures a frame at most)", STEADY_BUDGET >> 20); + } + } let fp = sample_fingerprint(d.src, size); - seeded.push((d.res.as_raw() as usize, StreamRecheck { base_frame: frame, stage: 0, last_fp: Some(fp) })); + seeded.push((d.res.as_raw() as usize, StreamRecheck { base_frame: frame, stage: 0, last_fp: Some(fp), whole })); } if !seeded.is_empty() || !unsent.is_empty() { let mut g = STREAM_RECHECK.lock().unwrap(); - for (res, state) in seeded { + for (res, mut state) in seeded { + // (a kept texture keeps the hash of all of it that a check took before this upload read + // it: a write since then is still a change, and nothing is read here) + if let (Whole::Unknown, Some(Whole::Hash(h))) = (state.whole, g.get(&res).map(|s| s.whole)) { + state.whole = Whole::Hash(h); ~~~~ --- **High**: On a whole upload, `seed_stream_recheck` keeps an existing `Whole::Hash(h)` even when the check that took h didn't trigger this upload, so the baseline can be arbitrarily old: from a check 16+ frames ago, a `reseed_downloaded`, or the memory at the previous `e.src`. In an A-B-A sequence, where the title writes C0 -> C1 (uploaded) -> C0 (e.g. an atlas cleared back to its initial state), the steady check sees hash == h(C0) and reports no change, so the PC texture keeps C1 while memory holds C0. When `recheck_source` moves `e.src` or a texture is re-queued, the stale h also causes a redundant whole upload. Resetting the baseline to the uploaded content (or to Unknown) on every whole upload would fix both.
stijn-boer commented 2026-12-02 22:21:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T22:21:52Z.


merge-check
base: 5ad98adbc3
head: 7783f9b608
verdict: not yet: the focused checks passed, all smoke runs completed, and the library abort affected both trees. This host exposed no GPU_UPLOAD heaps, leaving the changed mixed-UMA path unverified.

Windows / AMD RDNA4 — unwatched texture recheck redo with #3707 and #3455

Both builds include #3707 at 912ff558e932264511f386eb8b7e97cbf7cf46e2 and #3455 at 1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525. The combined baseline is cfdacf961cf9cced7aba34f4f11e6219ce55df2d, measured in the prior #3613 retest. The PR merged cleanly onto it at def66c5d589a6df50b1298156e9dee73bf6242c1, with a clean git diff --check and its own Cargo target directory.

Setup

AMD Radeon RX 9060 XT (32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332, Rust 1.100.0 debug, Agility SDK 1.620.2 with matching debug layer, DXC 1.9.2609.5.

Tested

cargo build --workspace passed. cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output recorded the following partial counts.

Build Passed Failed Ignored SKIPPED notices
main + #3707 + #3455 1585 9 47 2
Same base + #3617 1585 9 47 2

Both workspace commands exited 101. The library exited 0x80004005 on both builds. Both logged the same failures in fuzz_validate_and_gpu_1, fuzz_validate_and_gpu_3, gpu_smem_flat_descriptor_windows_and_limits, f32_programs_on_the_gpu, gpu_f32_compares_with_nan, gpu_float_compares_random, gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends, and two failures of two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs. The two skip notices were for disabled heap windows. Both debug-layer E2E checks and the texture-state check passed.

Three focused checks passed, with 0 failed, 0 ignored, and 0 skip notices using --test-threads=1 --show-output --nocapture. They cover comparison against the last upload, the check budget, and rechecks beyond the initial milestones.

Retail smoke

Ran scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary> with XCL_UMA_DRIVER=mixed and a fresh data root for title hash 2c508222. The baseline row is from the prior run under the same setup.

Build Exit Frames Peak commit Device removals / crashes
main + #3707 + #3455 0x0 1050 15709 MB 0 / 0
Same base + #3617, switch unset, AMD default UMA 0x0 1338 11505 MB 0 / 0
Same base + #3617, switch 1, AMD default UMA 0x0 1227 15856 MB 0 / 0
Same base + #3617, switch unset, mixed:0:128 0x0 1152 16012 MB 0 / 0
Same base + #3617, switch 1, mixed:0:128 0x0 1341 11050 MB 0 / 0

The baseline and the first pair used XCL_UMA_DRIVER=mixed without ranges, which selected AMD default UMA. The second pair explicitly requested XCL_UMA_DRIVER=mixed:0:128. Both logs for that pair reported that the adapter exposed no GPU_UPLOAD heaps and used a CUSTOM heap instead. The switch-on runs logged zero XCL_UNWATCHED_RECHECK events, so the frame and commit differences do not establish an effect from the recheck path.

Not tested

Remaining workspace tests after the abort, mixed GPU_UPLOAD re-upload and its startup and frame costs, and repeated performance pairs.

AI use

Codex (GPT-6) merged and built the PR, ran the tests and smoke test, compared the results with the combined baseline, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7360590453 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7360590453). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-02T22:21:52Z. --- merge-check base: 5ad98adbc360225ac8a57ad9661e16fe8df9d8dd head: 7783f9b608196d6b74f4cdec850e725054e8fd1c verdict: not yet: the focused checks passed, all smoke runs completed, and the library abort affected both trees. This host exposed no GPU_UPLOAD heaps, leaving the changed mixed-UMA path unverified. **Windows / AMD RDNA4 — unwatched texture recheck redo with #3707 and #3455** Both builds include #3707 at `912ff558e932264511f386eb8b7e97cbf7cf46e2` and #3455 at `1895d9e8ea3c64f7e91f4a0211f2a7aacff5c525`. The combined baseline is `cfdacf961cf9cced7aba34f4f11e6219ce55df2d`, measured in the prior #3613 retest. The PR merged cleanly onto it at `def66c5d589a6df50b1298156e9dee73bf6242c1`, with a clean `git diff --check` and its own Cargo target directory. **Setup** AMD Radeon RX 9060 XT (32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332, Rust 1.100.0 debug, Agility SDK 1.620.2 with matching debug layer, DXC 1.9.2609.5. **Tested** `cargo build --workspace` passed. `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output` recorded the following partial counts. | Build | Passed | Failed | Ignored | `SKIPPED` notices | |---|---:|---:|---:|---:| | `main` + #3707 + #3455 | 1585 | 9 | 47 | 2 | | Same base + #3617 | 1585 | 9 | 47 | 2 | Both workspace commands exited 101. The library exited `0x80004005` on both builds. Both logged the same failures in `fuzz_validate_and_gpu_1`, `fuzz_validate_and_gpu_3`, `gpu_smem_flat_descriptor_windows_and_limits`, `f32_programs_on_the_gpu`, `gpu_f32_compares_with_nan`, `gpu_float_compares_random`, `gpu_ps_readfirstlane_loop_on_a_primitive_edge_ends`, and two failures of `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs`. The two skip notices were for disabled heap windows. Both debug-layer E2E checks and the texture-state check passed. Three focused checks passed, with 0 failed, 0 ignored, and 0 skip notices using `--test-threads=1 --show-output --nocapture`. They cover comparison against the last upload, the check budget, and rechecks beyond the initial milestones. **Retail smoke** Ran `scripts/smoke.ps1 -Game <local folder> -Seconds 60 -Xcl <debug binary>` with `XCL_UMA_DRIVER=mixed` and a fresh data root for title hash `2c508222`. The baseline row is from the prior run under the same setup. | Build | Exit | Frames | Peak commit | Device removals / crashes | |---|---|---:|---:|---:| | `main` + #3707 + #3455 | `0x0` | 1050 | 15709 MB | 0 / 0 | | Same base + #3617, switch unset, AMD default UMA | `0x0` | 1338 | 11505 MB | 0 / 0 | | Same base + #3617, switch `1`, AMD default UMA | `0x0` | 1227 | 15856 MB | 0 / 0 | | Same base + #3617, switch unset, `mixed:0:128` | `0x0` | 1152 | 16012 MB | 0 / 0 | | Same base + #3617, switch `1`, `mixed:0:128` | `0x0` | 1341 | 11050 MB | 0 / 0 | The baseline and the first pair used `XCL_UMA_DRIVER=mixed` without ranges, which selected AMD default UMA. The second pair explicitly requested `XCL_UMA_DRIVER=mixed:0:128`. Both logs for that pair reported that the adapter exposed no `GPU_UPLOAD` heaps and used a CUSTOM heap instead. The switch-on runs logged zero `XCL_UNWATCHED_RECHECK` events, so the frame and commit differences do not establish an effect from the recheck path. **Not tested** Remaining workspace tests after the abort, mixed `GPU_UPLOAD` re-upload and its startup and frame costs, and repeated performance pairs. **AI use** Codex (GPT-6) merged and built the PR, ran the tests and smoke test, compared the results with the combined baseline, and drafted this report.
throny commented 2026-12-03 01:43:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-03T01:43:54Z.


Thanks for the third round. All three points hold; they are fixed in the PR's commit (amended, now 4714ed9bb; not pushed yet when this was written).

1. High: first whole check of a Whole::Unknown entry takes current memory as its baseline. Fixed. texture_upload::differs_from_sent now answers "may differ": a page the upload kept no hash of (read only in part, or nothing kept because unknown()/forget() ran or forgotten moved during fill) counts as changed (crates/xcl/src/hle/d3d12x/texture_upload.rs:138-149). Such a first check queues one more whole upload, and the hash it took becomes that upload's baseline (point 2), so this does not loop: the next check compares whole hashes and no longer relies on page hashes. The cost is one extra whole upload (at most 4 MiB) after an upload whose page hashes are incomplete. Tests: bytes_are_compared_with_what_the_last_upload_read now expects "may differ" for no hashes and for a zero-hash page. steady_recheck_keeps_small_unwatched_textures_past_the_milestones (title_textures.rs:7091) checks that after forget the first check queues the texture, that the upload that follows makes the hash its baseline, and that the next check finds nothing.

2. High: seed_stream_recheck keeps an old Whole::Hash on an upload no check queued. Fixed. A new Whole::Queued(h) (title_textures.rs:2331-2334) is what a check that finds a change leaves (:2687-2691). Only that hash carries over into the upload's seed (:2532-2535). Any other whole upload starts from Unknown, which also covers a moved e.src. A check that finds no change turns Queued into Hash (:2699). The test reproduces your A-B-A case (:7108): the title writes, an upload it did not queue reads that, then the title writes the old bytes back. The entry is Unknown after the seed, and the first check queues the texture.

3. Medium: overlapping passes write from stale snapshots. Fixed with the re-validation you suggested. When a pass records its results, it skips an entry that no longer equals the snapshot it read (title_textures.rs:2658-2662). That covers a seed or reseed in between and a pass of another thread's frame. The test (:7120) uses a test-only hook that runs between a pass's reads and its write-back (AFTER_RECHECK_READS, :2340-2344, :2651). It replaces the entry the way a concurrent seed would, and checks that the pass leaves it as it is and queues nothing.

Tests (Windows, debug, RTX 4080): cargo test -p xcl --lib d3d12x::title_textures gave 67 passed, 0 failed, 1 ignored. cargo test -p xcl --lib d3d12x::texture_upload gave 10 passed, 0 failed, 0 ignored. There were no SKIPPED notices. The whole suite was not rerun for this amend.

On @stijn-boer's "not yet" (merge check on 7783f9b6), the part that concerns this PR:

  • The abort with 0x80004005 and the 9 failures are the same tests with the same counts on both builds (1585 / 9 / 47 each). They come from the base, not this PR.
  • That no XCL_UNWATCHED_RECHECK line was logged is expected on that host. The switch acts only on textures in a GPU_UPLOAD segment of XCL_UMA_DRIVER=mixed, the range without write watch. Without ranges, mixed picked AMD's default UMA. With mixed:0:128 the adapter had no GPU_UPLOAD heaps (the log says so; Resizable BAR is probably off), so the window is one CUSTOM heap and nothing is in the unwatched range. On that host the runs count as a regression check with the switch on and off, not as coverage of the recheck. A run that covers it needs an adapter that exposes GPU_UPLOAD heaps.

Each round has found new points so far. Would the remaining ones block the merge, or can they be follow-ups once this round is in?

Pushed as 4714ed9b. The whole suite passes there (3007 passed, 0 failed), and the smoke block in the description is updated.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7364670655 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7364670655). Originally posted by [throny](https://github.com/throny) on 2026-12-03T01:43:54Z. --- Thanks for the third round. All three points hold; they are fixed in the PR's commit (amended, now `4714ed9bb`; not pushed yet when this was written). **1. High: first whole check of a `Whole::Unknown` entry takes current memory as its baseline.** Fixed. `texture_upload::differs_from_sent` now answers "may differ": a page the upload kept no hash of (read only in part, or nothing kept because `unknown()`/`forget()` ran or `forgotten` moved during `fill`) counts as changed (`crates/xcl/src/hle/d3d12x/texture_upload.rs:138-149`). Such a first check queues one more whole upload, and the hash it took becomes that upload's baseline (point 2), so this does not loop: the next check compares whole hashes and no longer relies on page hashes. The cost is one extra whole upload (at most 4 MiB) after an upload whose page hashes are incomplete. Tests: `bytes_are_compared_with_what_the_last_upload_read` now expects "may differ" for no hashes and for a zero-hash page. `steady_recheck_keeps_small_unwatched_textures_past_the_milestones` (`title_textures.rs:7091`) checks that after `forget` the first check queues the texture, that the upload that follows makes the hash its baseline, and that the next check finds nothing. **2. High: `seed_stream_recheck` keeps an old `Whole::Hash` on an upload no check queued.** Fixed. A new `Whole::Queued(h)` (`title_textures.rs:2331-2334`) is what a check that finds a change leaves (`:2687-2691`). Only that hash carries over into the upload's seed (`:2532-2535`). Any other whole upload starts from `Unknown`, which also covers a moved `e.src`. A check that finds no change turns `Queued` into `Hash` (`:2699`). The test reproduces your A-B-A case (`:7108`): the title writes, an upload it did not queue reads that, then the title writes the old bytes back. The entry is `Unknown` after the seed, and the first check queues the texture. **3. Medium: overlapping passes write from stale snapshots.** Fixed with the re-validation you suggested. When a pass records its results, it skips an entry that no longer equals the snapshot it read (`title_textures.rs:2658-2662`). That covers a seed or reseed in between and a pass of another thread's frame. The test (`:7120`) uses a test-only hook that runs between a pass's reads and its write-back (`AFTER_RECHECK_READS`, `:2340-2344`, `:2651`). It replaces the entry the way a concurrent seed would, and checks that the pass leaves it as it is and queues nothing. Tests (Windows, debug, RTX 4080): `cargo test -p xcl --lib d3d12x::title_textures` gave 67 passed, 0 failed, 1 ignored. `cargo test -p xcl --lib d3d12x::texture_upload` gave 10 passed, 0 failed, 0 ignored. There were no SKIPPED notices. The whole suite was not rerun for this amend. On @stijn-boer's "not yet" (merge check on `7783f9b6`), the part that concerns this PR: - The abort with `0x80004005` and the 9 failures are the same tests with the same counts on both builds (1585 / 9 / 47 each). They come from the base, not this PR. - That no `XCL_UNWATCHED_RECHECK` line was logged is expected on that host. The switch acts only on textures in a `GPU_UPLOAD` segment of `XCL_UMA_DRIVER=mixed`, the range without write watch. Without ranges, `mixed` picked AMD's default UMA. With `mixed:0:128` the adapter had no `GPU_UPLOAD` heaps (the log says so; Resizable BAR is probably off), so the window is one CUSTOM heap and nothing is in the unwatched range. On that host the runs count as a regression check with the switch on and off, not as coverage of the recheck. A run that covers it needs an adapter that exposes `GPU_UPLOAD` heaps. Each round has found new points so far. Would the remaining ones block the merge, or can they be follow-ups once this round is in? Pushed as `4714ed9b`. The whole suite passes there (3007 passed, 0 failed), and the smoke block in the description is updated. *AI use: Claude Code (Claude Opus 5.5).*
Foniass commented 2026-12-03 04:35:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T04:35:52Z.


merge-check
base: 078358a058
head: 4714ed9bb4
merge: clean
build: ok
tests: 3009 passed, 0 failed, 52 ignored; 28 skipped, the same as on main
review: 1 medium, 3 nits (below)
performance: 60 s smoke run: 1669 → 1679 frames (100 % of main), peak commit 17577 → 18035 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 234 s there, 0 device removals, 0 crashes, 2.9 presents/s; run with XCL_SKIP_CS=95cc13288a27a96e (the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590)
verdict: not yet: PR description is red; otherwise no blocking finding, the suite passes and the smoke run is clean
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5


In short: The PR adds XCL_UNWATCHED_RECHECK=1 (off by default): small textures in unwatched memory are hashed whole every 16 frames after the usual milestones, and the push to 4714ed9b reworks how a check picks its baseline. Reading the code at this head shows the three medium findings from the 7783f9b6 review are fixed, and the new paths have unit tests (no page hashes, the queued baseline, a pass racing a seed); the default path is unchanged. Nothing blocks merging; the main open point is that the switch-on cost was measured before this push, and the push adds a second whole upload for many kept textures.

Medium

  1. Switch-on cost not re-measured at the head, now with a second upload per kept texture. The cost run (900 s, 3.00 presents/s) is from 412e11e9, the A/B from e125eda8, and the test counts and smoke blocks from 7783f9b6. This head adds a path that costs more: differs_from_sent (texture_upload.rs ~137) now counts a page with no hash as changed. An upload keeps no hash for a page it read only in part (Hashes::note ~608), which covers linear textures read in row chunks that end inside a page, small mips whose block rows are under 4 KiB, and pages in padding between levels. So the first check after most outside whole uploads of such a texture queues it once more. That is one extra whole upload per upload, not a loop, because the queued upload takes the check's hash as its baseline. Re-run the switch-on world run at 4714ed9b with the XCL_UNWATCHED_RECHECK "goes up again" count logged, and update the cost and count lines in the description.

Nit

  1. A write undone between a check and the upload it queued is missed. seed_stream_recheck_keeping (title_textures.rs ~2525) turns Queued(h) into Hash(h) without comparing against the upload's page hashes. If the title writes B after the check hashed A, the upload reads B, and the title then writes A back, the next check sees A == h and the PC texture keeps B. The window is only from the check to the upload it queued, so this is much narrower than the earlier A-B-A case. Comparing the first check after a queued upload with differs_from_sent too, as the Unknown path does, would close it. Otherwise, name the limit in the commit message.
  2. Description and commit message out of date at this head. The description describes the earlier version: "What is in it" does not mention differs_from_sent, the Queued baseline, the second upload when an upload kept no page hashes, or the pass-overlap guard, and it lists only one of the two new tests. The commit message has one unwrapped line of about 110 characters ("Limit: a CPU write is not caught ..."). Three README lines run well past the file's usual width.
  3. Conflicts with open #3725. #3725 (streamed textures read through their pages are rechecked there) changes the same seed and recheck code and builds StreamRecheck entries without the new whole field. git merge-tree shows a content conflict in title_textures.rs, so whichever PR merges second needs a rebase and a look at how paged entries get a Whole state.
Checked and fine
  • Earlier finding fixed: First whole hash trusts an upload that kept no page hashes. differs_from_sent now returns true when the hash count does not match or a page hash is 0. The new test case (forget, then check) queues the texture once and does not queue it again after the upload.
  • Earlier finding fixed: A kept baseline can predate the upload it stands for. Only a Queued(h) hash, set by the check that queued the upload, is carried into the upload's seed; any other whole upload starts from Unknown. The test with a write and a write-back covers it.
  • Earlier finding fixed: Two recheck passes can overlap. They still can, but a pass now writes only entries equal to the snapshot it read (get_mut(..).filter(st == seen) ~2655), so a seed, a re-seed or another pass in between wins. A test-only hook tests this. Double queueing is still stopped by e.pending.
  • A recheck-queued upload is whole (Due.whole = e.pending ~2146), so Queued always becomes Hash at its seed and a check-queued texture cannot keep re-queueing
  • The switch-off path is unchanged: Whole::No entries keep the old milestone, slice and retire logic, and the existing tests only add the new field to their expected values. No assertion was removed or weakened.
  • Runtime code is under 300 lines (most of the 601 added lines are tests), one logical change, merges cleanly into current origin/main
How this was tested
  • Merged onto main 078358a0, then cargo build --workspace and cargo test --workspace --no-fail-fast -- --test-threads=4.
  • The skipped GPU tests are those this card can't run (no wave64 on NVIDIA, no D3D12 debug layer, and similar).
  • scripts/smoke.ps1: 60 s of a retail title on main 078358a0 and on this merge; presents per 2 s at the end: 60 60 60.
  • Title run: the release build of this merge launched the retail title with XCL_RUN_SECONDS=300 and scripted A presses counted from the first frame (XCL_PRESS_BASE=frame, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run.

Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7367826769 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3617#issuecomment-7367826769). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-03T04:35:52Z. --- merge-check base: 078358a058f7ba5d16690dba8dc4e55d2c88ae0a head: 4714ed9bb4f9074f7795d9b5d8117f297212cdd7 merge: clean build: ok tests: 3009 passed, 0 failed, 52 ignored; 28 skipped, the same as on main review: 1 medium, 3 nits (below) performance: 60 s smoke run: 1669 → 1679 frames (100 % of main), peak commit 17577 → 18035 MB, no device removal, no crash title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 234 s there, 0 device removals, 0 crashes, 2.9 presents/s; run with `XCL_SKIP_CS=95cc13288a27a96e` (the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590) verdict: not yet: `PR description` is red; otherwise no blocking finding, the suite passes and the smoke run is clean hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5 --- **In short:** The PR adds XCL_UNWATCHED_RECHECK=1 (off by default): small textures in unwatched memory are hashed whole every 16 frames after the usual milestones, and the push to 4714ed9b reworks how a check picks its baseline. Reading the code at this head shows the three medium findings from the 7783f9b6 review are fixed, and the new paths have unit tests (no page hashes, the queued baseline, a pass racing a seed); the default path is unchanged. Nothing blocks merging; the main open point is that the switch-on cost was measured before this push, and the push adds a second whole upload for many kept textures. #### Medium 1. **Switch-on cost not re-measured at the head, now with a second upload per kept texture.** The cost run (900 s, 3.00 presents/s) is from 412e11e9, the A/B from e125eda8, and the test counts and smoke blocks from 7783f9b6. This head adds a path that costs more: differs_from_sent (texture_upload.rs ~137) now counts a page with no hash as changed. An upload keeps no hash for a page it read only in part (Hashes::note ~608), which covers linear textures read in row chunks that end inside a page, small mips whose block rows are under 4 KiB, and pages in padding between levels. So the first check after most outside whole uploads of such a texture queues it once more. That is one extra whole upload per upload, not a loop, because the queued upload takes the check's hash as its baseline. Re-run the switch-on world run at 4714ed9b with the XCL_UNWATCHED_RECHECK "goes up again" count logged, and update the cost and count lines in the description. #### Nit 2. **A write undone between a check and the upload it queued is missed.** seed_stream_recheck_keeping (title_textures.rs ~2525) turns Queued(h) into Hash(h) without comparing against the upload's page hashes. If the title writes B after the check hashed A, the upload reads B, and the title then writes A back, the next check sees A == h and the PC texture keeps B. The window is only from the check to the upload it queued, so this is much narrower than the earlier A-B-A case. Comparing the first check after a queued upload with differs_from_sent too, as the Unknown path does, would close it. Otherwise, name the limit in the commit message. 3. **Description and commit message out of date at this head.** The description describes the earlier version: "What is in it" does not mention differs_from_sent, the Queued baseline, the second upload when an upload kept no page hashes, or the pass-overlap guard, and it lists only one of the two new tests. The commit message has one unwrapped line of about 110 characters ("Limit: a CPU write is not caught ..."). Three README lines run well past the file's usual width. 4. **Conflicts with open #3725.** #3725 (streamed textures read through their pages are rechecked there) changes the same seed and recheck code and builds StreamRecheck entries without the new whole field. git merge-tree shows a content conflict in title_textures.rs, so whichever PR merges second needs a rebase and a look at how paged entries get a Whole state. <details><summary>Checked and fine</summary> - Earlier finding fixed: First whole hash trusts an upload that kept no page hashes. differs_from_sent now returns true when the hash count does not match or a page hash is 0. The new test case (forget, then check) queues the texture once and does not queue it again after the upload. - Earlier finding fixed: A kept baseline can predate the upload it stands for. Only a Queued(h) hash, set by the check that queued the upload, is carried into the upload's seed; any other whole upload starts from Unknown. The test with a write and a write-back covers it. - Earlier finding fixed: Two recheck passes can overlap. They still can, but a pass now writes only entries equal to the snapshot it read (get_mut(..).filter(st == seen) ~2655), so a seed, a re-seed or another pass in between wins. A test-only hook tests this. Double queueing is still stopped by e.pending. - A recheck-queued upload is whole (Due.whole = e.pending ~2146), so Queued always becomes Hash at its seed and a check-queued texture cannot keep re-queueing - The switch-off path is unchanged: Whole::No entries keep the old milestone, slice and retire logic, and the existing tests only add the new field to their expected values. No assertion was removed or weakened. - Runtime code is under 300 lines (most of the 601 added lines are tests), one logical change, merges cleanly into current origin/main </details> <details><summary>How this was tested</summary> - Merged onto main `078358a0`, then `cargo build --workspace` and `cargo test --workspace --no-fail-fast -- --test-threads=4`. - The skipped GPU tests are those this card can't run (no wave64 on NVIDIA, no D3D12 debug layer, and similar). - `scripts/smoke.ps1`: 60 s of a retail title on main `078358a0` and on this merge; presents per 2 s at the end: 60 60 60. - Title run: the release build of this merge launched the retail title with `XCL_RUN_SECONDS=300` and scripted A presses counted from the first frame (`XCL_PRESS_BASE=frame`, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run. </details> <sub>Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.</sub>
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3617:upstream-pr/3617'
git switch 'upstream-pr/3617'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3617'
git switch 'upstream-pr/3617'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3617'
git switch 'upstream-pr/3617'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3617'
git switch 'main'
git merge --squash 'upstream-pr/3617'
git switch 'main'
git merge --ff-only 'upstream-pr/3617'
git switch 'main'
git merge 'upstream-pr/3617'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!3617
No description provided.