Preserve disjoint GPU write ranges during readback #301
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!301
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-301"
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?
@erdtreefaithful on GitHub · 2026-12-05 22:50 UTC · original
erdtreefaithful:feature/preserve-readback-write-ranges→main· +505 −86 · 3 files · 1 commits · merged 2026-12-05 23:10 UTCPreserve disjoint GPU write ranges during readback
Problem
Two writes at opposite ends of a buffer are merged into one readback span. The host then copies the gap back into guest memory, where it can overwrite bytes the CPU changed after the GPU copy.
Changes
Track the union of declared writes within each command list and across lists in a submission. Copy and deliver only those intervals. Keep buffer ownership, completion tracking, and the optional full-object diagnostic comparison at object scope. Two four-byte writes at opposite ends of a 64 KiB buffer require eight bytes of readback traffic. Preserving the gap also lets the guest retain its CPU-written data.