Repository navigation
Conversation
|
merge-check AI-written and posted by Foniass without a human check of each point. |
|
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 AI use: Claude Code (Claude Opus 5.5). |
|
merge-check claim |
|
merge-check |
|
merge-check claim withdrawn Withdrawn: this PR is labelled needs:amd-test and we have no AMD hardware. Sorry for the noise; the slot is free. |
bmjask
left a comment
There was a problem hiding this comment.
Review of c9283790: 2 finding(s) (1 high, 1 medium), most severe first.
- 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) - Medium
crates/xcl/src/hle/d3d12x/title_textures.rs:2533: The newgpu_written && steady_keepsarm neither checks nor prunes the entry, so a GPU-written kept entry stays in STREAM_RECHECK for good withbase_framefrozen, 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.
|
@Prime1997 could you take a look at this one for review and merge? My automated review notes are above, if any. |
|
merge-check Windows / AMD RDNA4 (native D3D12) — workspace suite and retail smoke on Clean merge onto Setup
Tested
Counts are partial because two test processes aborted on each build.
Shared failures and process aborts
Retail smoke Ran
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 AI use Codex (GPT-6) ran the builds and tests, reviewed the diff, compared the results with |
|
Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on Merged onto Setup
Tested:
About the failures on
|
c928379 to
412e11e
Compare
|
@Foniass thanks for the review; everything is in
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 AI use: Claude Code (Claude Opus 5.5) made the changes, ran the tests and wrote this. |
bmjask
left a comment
There was a problem hiding this comment.
Review of 412e11e9: 4 finding(s) (1 high, 3 medium), most severe first.
- High
crates/xcl/src/hle/d3d12x/title_textures.rs:2489: A kept texture is seeded asWhole::Unknownand gets its first whole hash only at a later check, after the upload has already read it. (inline) - Medium
crates/xcl/src/hle/d3d12x/title_textures.rs:2597:steady_waitingremoves deferred kept entries fromcheckentirely and orders bybase_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) - Medium
crates/xcl/src/hle/d3d12x/title_textures.rs:4209:reseed_downloadeddoesn't checkentry.cpu_backed, so GPU-owned placements (fromregister_gpu_owned) that get downloaded are put under the recheck. (inline) - Medium
crates/xcl/src/hle/d3d12x/title_textures.rs:4207:publish_downloaddrops the TEXTURES lock beforereseed_downloadedinserts into STREAM_RECHECK, so a concurrentforgetorregisteron 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.
412e11e to
7783f9b
Compare
|
Thanks. All four were real; they are fixed in
Tested on an RTX 4080 (debug build) with Pushed as AI use: Claude Code (Claude Opus 5.5). |
bmjask
left a comment
There was a problem hiding this comment.
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.
- High
crates/xcl/src/hle/d3d12x/title_textures.rs:2676: The first whole-hash check of aWhole::Unknownentry still takes the current memory as its baseline, and its only guard against writes made after the upload read the texture isdiffers_from_sent, which returns false whenever the uplo.... (inline) - High
crates/xcl/src/hle/d3d12x/title_textures.rs:2525: On a whole upload,seed_stream_recheckkeeps an existingWhole::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, areseed_downloaded, or the me.... (inline) - Medium
crates/xcl/src/hle/d3d12x/title_textures.rs:2556: see below.
On lines outside the diff:
- Medium
crates/xcl/src/hle/d3d12x/title_textures.rs:2556:LAST_RECHECK_FRAME.swaponly 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 staleseensnapshots. If thread A is still reading for frame F when B starts F+1, both snapshot entry X and both runst.stage += 1, so X skips a milestone. Or one pass writeswhole: Hash(cur_old)over an entry thatseed_stream_recheck/reseed_downloadedrefreshed 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.
|
merge-check Windows / AMD RDNA4 — unwatched texture recheck redo with #3707 and #3455 Both builds include #3707 at 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
Both workspace commands exited 101. The library exited Three focused checks passed, with 0 failed, 0 ignored, and 0 skip notices using Retail smoke Ran
The baseline and the first pair used Not tested Remaining workspace tests after the abort, mixed 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. |
Title textures are copies: XCL reads the title's bytes, detiles them and uploads them into its own PC texture, and learns of changes by write watch. The GPU_UPLOAD range of XCL_UMA_DRIVER=mixed has no write watch, so a texture there is uploaded when it is made and after that only by the stream recheck, which fingerprints three 16 KiB slices at 5 milestones (4 to 400 frames) and then drops the texture for good. A small texture the CPU rewrites later than that, or outside the slices, is never uploaded again; with the mixed driver the control-hint glyphs lost letters (xcl-dev#1049). XCL_UNWATCHED_RECHECK=1 (off unless given): a texture of up to 4 MiB in a committed window that is not fully write-watched keeps the milestones, is then not retired but checked every 16 frames, and is compared by a hash of all of it. Every read of all of a texture is a check under the frame's budget of 8 MiB and 64 textures (checks at their milestones first, then the longest unchecked); nothing is read when a texture is seeded. Its first check, at the first frame after its upload with room for it, takes the whole hash and also compares each page with the hash the upload kept of what it read there (texture_upload::differs_from_sent), so a write between the upload's read and that check is caught; a page the upload kept no hash of (read only in part, or nothing kept) counts as changed, and the texture goes up once more. A check that waits for room is made by the slices at a milestone, as with the switch off. A check that finds a change keeps its hash as the baseline of the whole upload it queues, since it was taken before that upload read the texture; any other whole upload starts from no whole hash. A pass leaves an entry that changed after it read the texture (seeded meanwhile, or written by another thread's pass) as it is. Entries that pass the last milestone together are staggered over the 16-frame period. A texture that becomes GPU-written is still removed by publish_submission_effects; a download that hands a CPU-backed one back to the CPU seeds it again from the bytes it wrote, while the texture table is held. Limit: a CPU write is not caught that was made while the texture was GPU-written, to a subresource a later download did not cover: the download's re-seed takes the title's bytes there as the baseline (main never checks such a texture again). Everything else is unchanged. Measured on an RTX 4080, mixed driver, same build, 900 s, hint phase, near-white pixels in the left quarter of the frame: run 402 (switch off) 355 px, hint text "B g / K b g"; run 404 (switch on) 582 px, text complete. Presents/s from 240 s: 3.10 vs 3.07. Run 403 (switch on) lost the device at +95 s with the same page fault as plain main's run 344, before the hint phase. n = 1 per side. These runs were on an earlier version (seed-time whole hash, no budget, no stagger). Part of xcl-dev#1049 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7783f9b to
4714ed9
Compare
|
Thanks for the third round. All three points hold; they are fixed in the PR's commit (amended, now 1. High: first whole check of a 2. High: 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 ( Tests (Windows, debug, RTX 4080): On @stijn-boer's "not yet" (merge check on
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 AI use: Claude Code (Claude Opus 5.5). |
|
merge-check 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 4714ed9 reworks how a check picks its baseline. Reading the code at this head shows the three medium findings from the 7783f9b 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
Nit
Checked and fine
How this was tested
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
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; theGPU_UPLOADrange 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 throughwith_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 bypublish_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 teststeady_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=4on head4714ed9b(after bmjask's third review): 3007 passed, 0 failed, 52 ignored, 25SKIPPEDlines.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 onc9283790.25
SKIPPEDlines: 22no wave64(RTX 4080 has no wave64), 2no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form,bind::tests::two_pass_binds_set_the_shared_view_heap), 1shaders::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):Switch-on cost at
412e11e9(review point 2): a 900 s warm world run withXCL_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:this PR's head:
Not tested
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.AI use
🤖 Generated with Claude Code