Proposal: zero-copy section-backed ID3D12Heap placement and fence-based in-place hazard tracking #57
Labels
No labels
accessibility
benchmark
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
task-claim
telemetry
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/monte-alt--vesper#57
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?
@ending3729 on GitHub · 2026-12-04 14:42 UTC · original
Per
CONTRIBUTING.mdandROADMAP.md, I am opening this proposal instead of an unclaimed PR because the implementation touchesshadow.rsandhost.rs, which are currently locked in@monte-alt's active Phase 2B/3 queue.Background
Vesper already splits large lazy physical allocations into
64 MiBsections (VSP-03/ PR #17), which avoids long Windows section-lock walks. However, on Windows those sections are still created withSEC_RESERVE, which D3D12OpenExistingHeapFromFileMappingrefuses. As a result, views backed by those sections still fall back to host/card shadow copies, snapshots, and CPU-side page diffs.Proposed Design (3 Stacked Pieces)
SEC_COMMITchunks (withSEC_RESERVEfallback) inxmem.rs64 MiBchunks lazily on first map/use withSEC_COMMIT(falling back toSEC_RESERVEif commit headroom is tight), keep allocations<= 256 MiBas a single contiguous section for 32-bit heaps, and decrementPOOL_COMMITTEDwhen a chunk drops after free + unmap.188ce99)OpenExistingHeapFromFileMappingplacement ininplace.rs/shadow.rsCover::Runxmemviews directly into section-backedID3D12Heaps, guarded byPLACING/STATSfreeing barriers andhost::retire_cachedso section heaps are never closed or freed out from under active placement or in-flight command lists.e68ec1d)host.rs/draw.rs/card_steps.rsLATE_WAIT/RELAY, record per-flight GPU in-place read and write ranges (InPlaceHazards) and wait only on conflicting flight fences (RAW/WAW/WAR) via a unifiedStep::cpu_accesshelper, blocking unsafejoinableCPU writes (Step::Placed,Step::Host,Step::Refresh), replaying in-place CBVs acrossValueWaitcuts (FreshTable), and retaining bindless in-place reads/UAVs across same-frame lists.7f58eab)(Note: The reference branches above were written and CI-verified on a
cool_foxfork withcargo clippy --workspace --all-targets --all-features --locked -- -D warningsandcargo test --workspace --locked. I do not have title files locally, so a rebase ontovesperwould rely on local unit/WARP tests plus a community tester on AMD Radeon hardware for 1440p HW RT before/after telemetry.)Questions for
@monte-altOpenExistingHeapFromFileMappingplacement + fence-basedInPlaceHazardsfit your post-Phase 2B/3 direction forshadow.rs/host.rs?VSP-XXroadmap item so it can be claimed once the active queue lock onshadow.rs/host.rslifts?