D3D12.X: video-memory arenas never overlap #122
No reviewers
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!122
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/122/head"
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?
@gefydev on GitHub · 2026-11-23 13:25 UTC · original
gefydev:d3d12x-vram-arenas→main· +123 −8 · 1 files · 1 commits · merged 2026-11-23 14:13 UTC#104 item 1.
arena_forreused an arena only if it held the whole placement. A new arena took the 32 MiB blocks from below the address up to 128 MiB, with no check against the arenas already there. So a placement that straddled an arena, or a new arena that grew into one, gave two heaps over the same title addresses. Resources at one address could then land in different heaps and stop aliasing.The layout is now a pure function,
plan, over the arena ranges.arena_forapplies it:I picked merging over "allocate the remainder" because a D3D12 resource must sit in one heap. A straddling resource cannot be split between the old arena and a remainder heap.
Tests in
vram::tests, CPU only:Each step also checks that no two arenas overlap. With the old rule the first test's second step gives
[0x1_0200_0000, +128 MiB)over the first arena. The other lib tests pass on a GTX 1650 under Wine. Not run with a retail title.@ivall on GitHub · 2026-11-23 14:14 UTC · original
Merged. XDefiant hits it in practice: ~78 s in it logs one straddling placement merged into a new arena, and runs on. Checked on Windows 11 with an RX 9070 (RDNA4), merged together with the rest of #110–#129:
cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), lib tests also withXCL_SPLIT_WAVE64=1; the retail pack still translates 26 698 / 26 698; the FSR4 GPU probe passes; Unicorn Overlord and XDefiant run. Thanks!