fix(gpu): preserve CPU-source waits during GPU forwarding #117

Closed
github-bot wants to merge 1 commit from github-bot/gh-117 into main AGit
Owner

@⁠krofty on GitHub · 2026-11-27 18:23 UTC · original
fix/placed-source-wait → main · +40 −5 · 1 files · 1 commits · closed without merging

A GPU-forwarded fill could bypass a wait still needed by a placed copy's CPU upload source. A list recorded before that source's first GPU writer can retain upload scratch; if an earlier submission later writes the source, preparing the scratch before landing reads stale bytes.

Carry the existing Placed::waits CPU-source requirement into the step planner and reject that GPU plan before it records or redirects anything. GPU-backed and already-landed sources retain ordered forwarding. This preserves the existing wait and alias rules; it adds no locks or resource-lifetime changes.

Closes #109.

Validation on the working integration baseline, with the same patched planner file:

  • Exact pure production planner: removing the guard fails the stale-source regression; the fixed planner passes both new tests.
  • Planner module: 10 tests reported passed, 1 ignored. CPU-only module testing did not exercise hardware-specific paths.
  • Diagnostics build.sh build passed; 3 texture-room, 4 game and 44 loader tests passed.
  • Two normal in-world RTX3070 runs, ordered splitting off/on, closed normally with no logged exception or device loss. No RenderDoc injection or frame generation.
  • Independent source review and complete diff check passed. A separate build of current upstream main was not run.

Ordered splitting remains opt-in and disabled in the working preset: its separate off/on experiment did not show a performance gain. No claim is made that this fixes the capture crash or all GPU/guest ownership issues. This PR should remain open until the user authorizes merging.

**@⁠krofty** on GitHub · 2026-11-27 18:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/117) `fix/placed-source-wait` → `main` · +40 −5 · 1 files · 1 commits · closed without merging A GPU-forwarded fill could bypass a wait still needed by a placed copy's CPU upload source. A list recorded before that source's first GPU writer can retain upload scratch; if an earlier submission later writes the source, preparing the scratch before landing reads stale bytes. Carry the existing `Placed::waits` CPU-source requirement into the step planner and reject that GPU plan before it records or redirects anything. GPU-backed and already-landed sources retain ordered forwarding. This preserves the existing wait and alias rules; it adds no locks or resource-lifetime changes. Closes #109. Validation on the working integration baseline, with the same patched planner file: - Exact pure production planner: removing the guard fails the stale-source regression; the fixed planner passes both new tests. - Planner module: 10 tests reported passed, 1 ignored. CPU-only module testing did not exercise hardware-specific paths. - Diagnostics `build.sh` build passed; 3 texture-room, 4 game and 44 loader tests passed. - Two normal in-world RTX3070 runs, ordered splitting off/on, closed normally with no logged exception or device loss. No RenderDoc injection or frame generation. - Independent source review and complete diff check passed. A separate build of current upstream main was not run. Ordered splitting remains opt-in and disabled in the working preset: its separate off/on experiment did not show a performance gain. No claim is made that this fixes the capture crash or all GPU/guest ownership issues. This PR should remain open until the user authorizes merging.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:28:16 +00:00
github-bot closed this pull request 2026-11-28 01:24:22 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!117
No description provided.