Preserve disjoint GPU write ranges during readback #301

Manually merged
github merged 1 commit from github-bot/gh-301 into gh-pr/301/base 2026-12-06 00:59:31 +00:00 AGit
Owner

@⁠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 UTC

Preserve 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.

**@⁠erdtreefaithful** on GitHub · 2026-12-05 22:50 UTC · [original](https://github.com/gamingwithhomie/larp/pull/301) `erdtreefaithful:feature/preserve-readback-write-ranges` → `main` · +505 −86 · 3 files · 1 commits · merged 2026-12-05 23:10 UTC # Preserve 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 22:52:57 +00:00
github-bot changed target branch from main to gh-pr/301/base 2026-12-05 23:13:39 +00:00
github-bot referenced this pull request from a commit 2026-12-06 00:57:57 +00:00
github manually merged commit eb7ea1f9b3 into gh-pr/301/base 2026-12-06 00:59:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.