Repository navigation
Conversation
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 is not retired; it is hashed whole every 16 frames for as long as it lives. A frame reads at most 8 MiB and 64 textures (longest unchecked first), and 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, so they do not all come due together. A change queues a whole upload as before. A texture that becomes GPU-written is still removed by publish_submission_effects, as before. 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 the commit before the frame count cap and the stagger. Part of xcl-dev#1049 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 |
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
cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 2905 passed, 0 failed, 51 ignored (sum of alltest resultlines), exit 0, on headc9283790.e125eda8, before the frame count cap, the stagger and the baseline budget; it was not repeated onc9283790.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).XCL_UMA_DRIVER=mixed, 900 s, hint phase, near-white pixels in the left quarter of each 960x540 frame):Regression run
main (
f07e426d):this PR's head (
c9283790):The smoke run does not set the switch (it is off by default), so it only shows that the default path is unchanged.
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