Skip to content

D3D12.X: skip only successful uploads of unchanged title textures - #1

Merged
frabous merged 5 commits into
mainfrom
fix/title-textures-upload-cache
Nov 24, 2026
Merged

frabous merged 5 commits into
mainfrom
fix/title-textures-upload-cache

Conversation

@frabous

@frabous frabous commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Fix the unchanged-texture upload cache from ivall#486 (related: ivall#504). Hash and detile one CPU snapshot, record the hash only after a successful upload, and invalidate it when the mapping or source changes or the GPU writes the texture.

What is in it

Tested

  • Clean change set corresponding to 1c20a6f, debug build; Windows 11 build 26300, Intel Core i7-13650HX, RTX 5070 Laptop (driver 32.0.16.2124), Rust 1.99.1.
  • cargo build --workspace succeeded. cargo test --workspace -- --test-threads=4 --show-output: 678 passed, 0 failed, 41 ignored, 2 skipped at runtime (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

Regression run

  • Pending: no retail smoke runs on the base and head commits. Keep in draft until both runs can be recorded.

Not tested

  • Retail smoke, AMD, and the reported watchdog stall.

AI use

  • OpenCode (GPT-6.2 Sol) implemented the adaptation, ran the tests, and drafted this PR.

theaustinayers and others added 5 commits November 23, 2026 19:50
… uploaded again

The write watch is per page, and a title writes next to its textures and rewrites what it wrote: every texture with a written page was detiled and uploaded again before each submit. With a retail title's intro video that was about 25 MB a presented frame where about 3 MB had changed, and the title's submits spent their time in the refresh. The texture's memory is hashed first (four multiply-rotate lanes over 8-byte words, ~4.5 GB/s measured); the same hash as at the last upload of that texture object leaves it out. A texture that is released, or whose address is registered again, starts over. XCL_TEXTURE_SKIP_UNCHANGED=0 turns it off.

Assisted-by: Claude Code (Claude Fable 5.2)
D3D12.X: a title texture whose memory is as at its last upload is not uploaded again
Sample successfully presented frames over at least one second using the existing window timer. Keep FPS visible alongside shader compilation progress and report zero when presentation stops. Cover irregular sampling, sample intervals, stalls and recovery with unit tests.
D3D12.X: show live FPS in the game window title
Hash and detile one CPU snapshot, and record its hash only after the upload succeeds. Invalidate it on remapping, source changes and GPU writes.

Assisted-by: OpenCode (GPT-6.2 Sol)
@frabous
frabous marked this pull request as ready for review November 24, 2026 01:36
@frabous
frabous merged commit e3648eb into main Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants