D3D12.X: a changed title texture uploads only the subresources its written pages touch #2396
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#2396
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@KOLESNiii on GitHub · 2026-11-25 17:43 UTC · original
Part of #2390. Depends on #2395 (per-page hashes).
When a title texture changed,
upload_alldetiles and uploads every subresource of it (subresources_of_all,crates/xcl/src/hle/d3d12x/title_textures.rs:1116onmain3f4495a). The comment just above (:1095-1098) measured the cost: "a retail title's video planes and UI targets went up again for every submit, ~25 MB a presented frame where ~3 MB had changed". #486 fixed the case where nothing changed, but not the case where a little did.Proposal: from the changed pages (#2395), work out which subresources they overlap. GFX10 keeps small mips first and level 0 last, and slices are
slice_bytesapart, soxg::Texture'schainalready has the offsets. Detile and copy only those subresources. A single mip level of a large texture could also be cut to the changed rows, but that is a follow-up.Test: a write into one mip's pages of a mipmapped array texture uploads that subresource only, and a GPU readback of the others is unchanged. This complements #1511 / #1513 (detiling speed): they make each detile cheaper, and this does fewer of them.
Found by code reading with Claude Code (Claude Opus 5.5).