GPU: a withheld range can suppress a disjoint valid marked write on the same page #1976

Open
opened 2026-11-26 04:50:29 +00:00 by github-bot · 2 comments
Owner

@⁠yualk on GitHub · 2026-11-25 02:10 UTC · original

Reproduced at 940d32f69b22265690a0b5a15d6ded572ba33baf with a title-free D3D12 fixture on NVIDIA (10de:2c05) and WARP (1414:008c). This is distinct from #721: no concurrent guest writes occur in the fixture.

  1. Create and fully refresh a tracked two-page shadow. Record two lists in one Host::execute submission. Each list declares one four-byte GPU write. List A writes 5a 5a 5a 5a at offset 64; list B writes a5 a5 a5 a5 at offset 256. The fixture uses GPU buffer copies for the two payloads and the page bitmap, and a defer_missed callback on B to select the miss/no-miss arm.
  2. In the callback (after waiting on the submission), verify the expected page bits and that the first page was current. Independently verify both payloads in mapped shadow memory after the call.
  3. Inspect guest bytes: on both adapters, same-page marked+miss retires 00 00 00 00 for both ranges. With the legacy snapshot path the same ranges retire 5a 5a 5a 5a for A and zero for B. Moving B to 64 KiB + 256 in the marked arm also preserves A and withholds B. With no miss, the marked same-page arm publishes both payloads.

shadow.rs::copy_back_marks skips the whole 64 KiB page for any withheld declaration on that shadow that overlaps it. One shared page bit cannot identify which list wrote a byte; globally requiring a successful declaration is not safe either because directly indexed writes can be undeclared. The narrow invariant to preserve is that a disjoint valid write must not be lost solely because a missed range shares its page, without releasing bytes attributable to the missed list. No title scene, lighting or FPS claim.

**@⁠yualk** on GitHub · 2026-11-25 02:10 UTC · [original](https://github.com/Marvisak/VIctory/issues/1976) Reproduced at `940d32f69b22265690a0b5a15d6ded572ba33baf` with a title-free D3D12 fixture on NVIDIA (10de:2c05) and WARP (1414:008c). This is distinct from #721: no concurrent guest writes occur in the fixture. 1. Create and fully refresh a tracked two-page shadow. Record two lists in one `Host::execute` submission. Each list declares one four-byte GPU write. List A writes `5a 5a 5a 5a` at offset 64; list B writes `a5 a5 a5 a5` at offset 256. The fixture uses GPU buffer copies for the two payloads and the page bitmap, and a `defer_missed` callback on B to select the miss/no-miss arm. 2. In the callback (after waiting on the submission), verify the expected page bits and that the first page was current. Independently verify both payloads in mapped shadow memory after the call. 3. Inspect guest bytes: on both adapters, same-page marked+miss retires `00 00 00 00` for **both** ranges. With the legacy snapshot path the same ranges retire `5a 5a 5a 5a` for A and zero for B. Moving B to `64 KiB + 256` in the marked arm also preserves A and withholds B. With no miss, the marked same-page arm publishes both payloads. `shadow.rs::copy_back_marks` skips the whole 64 KiB page for any withheld declaration on that shadow that overlaps it. One shared page bit cannot identify which list wrote a byte; globally requiring a successful declaration is not safe either because directly indexed writes can be undeclared. The narrow invariant to preserve is that a disjoint valid write must not be lost solely because a missed range shares its page, without releasing bytes attributable to the missed list. No title scene, lighting or FPS claim.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:50:29 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-25 02:27 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-25 02:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/1976#issuecomment-7150746566) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 12:47 UTC · original

Automated triage for the maintainers.

Confirmed in main (940d32f). copy_back_marks in crates/victory-gpu/src/shadow.rs skips a marked 64 KiB page entirely (continue) when any withheld range of the same copy overlaps it, so a disjoint write from another list on that page is not copied back. The shortcut: note above the function covers the opposite case (a withheld list's writes going back), not this one.

Open PRs: #1986 and #1998 (#2004 was closed).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 12:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/1976#issuecomment-7162854421) <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T02:27:26Z at=2026-11-25T12:49:30Z --> Automated triage for the maintainers. Confirmed in `main` (`940d32f`). `copy_back_marks` in `crates/victory-gpu/src/shadow.rs` skips a marked 64 KiB page entirely (`continue`) when any withheld range of the same copy overlaps it, so a disjoint write from another list on that page is not copied back. The `shortcut:` note above the function covers the opposite case (a withheld list's writes going back), not this one. Open PRs: #1986 and #1998 (#2004 was closed). --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#1976
No description provided.