D3D12.X: buffer mirrors in sparse windows are written each draw and uploaded again #2394
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#2394
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 #2389.
When the title has sparse windows,
mirror_ofputs a new mirror in sparse memory first (super::sparse::alloc,crates/xcl/src/hle/d3d12x/list_x.rs:3524onmain3f4495a). It falls back to the coherent window only when that fails. Each draw's sync then writes into sparse-window pages from the CPU. As far as I can tell from the code, the next submit's write-watch look (title_textures::refresh_once→sparse::before_execute) finds those pages dirty, scans them and uploads them to the tiles' video memory. Every draw's copy is therefore copied a second time, and it adds pages to the look that #582 is about.Proposal: allocate mirrors in a committed coherent window (
Uma::alloc), which the GPU reads in place, and use sparse memory only when the coherent window has no room. Before changing it, confirm with #2391's counters andXCL_ACTIVITYthat mirror pages really show up among the sparse dirty pages.Found by code reading with Claude Code (Claude Opus 5.5); not verified on a run yet.