startup: recheck single-mip A8 atlases every frame #1638
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1645"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by rm-NoobInCoding on 2026-11-24T15:43:28Z.
Change
The startup draw uploader re-hashes a CPU-backed texture that has no XG write notification on its first bind each frame only when it is a single-mip, single-slice
R8_UNORMplane. Every other format waits 15 frames (x2w_startup::recheck_cpu_texture,src/startup_stubs/slice_footprints.h).A text renderer can add glyphs to a single-mip
A8_UNORMatlas between draws without an XG copy, so newly added characters reached the desktop copy up to 15 frames late: on each new screen some characters were missing and then appeared at once, about half a second later at ~28 fps.This change gives single-mip, single-slice
A8_UNORMthe same one-frame recheck asR8_UNORM. The inclusive 32 MiB cap, the 15-frame interval for every other texture (including A8 with more than one mip or slice) and explicit XG write notifications are unchanged. The two doc passages that state the rule are updated.No shared interface changes.
Verification
Base
141617bb, patch126ce023. Windows 11 build 26300, MSVC 19.51.36260,devpreset (Debug), NVIDIA GeForce RTX 4070, driver 617.14, D3D12 debug layer off.Result: 4/4 passed, no capability skips (
startup_plane_refresh_warp,startup_plane_refresh_hardware,startup_slice_footprints,startup_slice_footprints_padded_control).python -B tests/docs_links_check.py: self-test passed, 16 Markdown files and 348 links checked.Negative control. With only
slice_footprints.hreverted to the base and the new test cases kept,startup_slice_footprintsfails 2 of 61 checks:The new cases also require A8 with 2 mips and an A8 array of 2 to keep the 15-frame interval (not read after 1 or 14 frames, read after 15), and A8 past 32 MiB to never be re-read.
Evidence and follow-up
Local diagnostic runs of a console executable on the startup stand-ins (
tools/startup/run.ps1 -Render -FakeUser -GpuMirror -HostCpu); raw logs, pointers, binaries and captures are not attached.A8_UNORMtexture. It changed in bursts as new screens added text.The public fixture verifies the recheck interval decision; the visual result is an observation from the local run only.
Checklist
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T15:55:55Z.
Review: COMMENTED
Dual-platform peer review at commit
126ce02388f37ad5b372b2dee5ffaaef8389bfc1: 0 blocking issues.Findings
src/startup_stubs/slice_footprints.h(recheck_cpu_texture): extends the 1-frame recheck rule from single-mip, single-sliceDXGI_FORMAT_R8_UNORMtextures to also includeDXGI_FORMAT_A8_UNORM, while preserving the 15-frame interval for multi-mip/array A8/R8 and all other formats, as well as the inclusive 32 MiB cap.tests/startup_slice_footprints_check.cpp: covers A8 single-mip/single-slice (elapsed_frames0 vs 1, 32 MiB vs 32 MiB + 1) and negative multi-mip / array-of-2 cases at frames 1, 14, and 15.docs/experiments.md,docs/startup-runtime.md) and comment (src/startup_stubs/d3d12_draw.inl) are consistent with the code.Verification
python3 tests/docs_links_check.py: passed (16 Markdown files, 348 links).python3 tests/bidi_controls_check.py: passed (1266 tracked files).--preset dev):cmake --build --preset dev --target startup_slice_footprints_check startup_plane_refresh startup_nv12_draw startup_stub_xg_xs -- -j 6(5.29s);ctest --preset dev -R '^(startup_slice_footprints|startup_slice_footprints_padded_control|startup_plane_refresh_warp|startup_nv12_draw_warp)$' --parallel 4 --no-tests=error --output-on-failure— 4/4 passed (0.38s)./O2(--preset release):cmake --build --preset release --target startup_slice_footprints_check startup_plane_refresh startup_nv12_draw startup_stub_xg_xs -- -j 6(2.71s);ctest --preset release -R '^(startup_slice_footprints|startup_slice_footprints_padded_control|startup_plane_refresh_warp|startup_nv12_draw_warp)$' --parallel 4 --no-tests=error --output-on-failure— 4/4 passed (0.28s).AI-assisted; commands listed were executed locally.