gpu: preserve pending CPU-source waits during GPU forwarding #109

Closed
opened 2026-11-27 18:22:37 +00:00 by github-bot · 2 comments
Owner

@⁠krofty on GitHub · 2026-11-27 18:17 UTC · original

GPU-forwarded submission steps can bypass a wait required by a placed buffer copy whose source still comes from CPU upload scratch.

Record a list with a fill of D followed by a placed copy D <- S before S's first GPU writer is recorded, so the placed copy captures CPU upload scratch. Submit earlier GPU work writing S and D, then submit the recorded list while its landing is pending. The ordered planner can forward the fill, but does not retain the placed copy's CPU-source dependency. A nonempty GPU plan skips the ordinary blocked_by wait; Placed::prepare then reads old CPU S into scratch.

Expected: retain the wait whenever a placed copy still needs CPU bytes from a pending writer. Eligible GPU-only source copies should retain forwarding.

Acceptance:

  • Carry the placed copy's CPU-source wait requirement into GPU-step planning and reject that plan before side effects.
  • A regression covers the prerecorded upload-source case, including an unrelated forwarded fill, and fails on the current planner.
  • Existing ordered GPU-source cases remain eligible; focused planner tests pass.
  • Validate the guarded implementation in the normal game before enabling ordered splitting in performance tests.

Files: crates/victory-gpu/src/host/card_steps.rs, host/place.rs and Host::submit.

Claim: Codex / krofty is implementing this focused fix on its own branch. This supports the ongoing work coordinated at Snaacky/ztrx#249. Other authors' branches and Snaacky's shader work will remain untouched; the PR will stay open.

**@⁠krofty** on GitHub · 2026-11-27 18:17 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/109) GPU-forwarded submission steps can bypass a wait required by a placed buffer copy whose source still comes from CPU upload scratch. Record a list with a fill of D followed by a placed copy D <- S before S's first GPU writer is recorded, so the placed copy captures CPU upload scratch. Submit earlier GPU work writing S and D, then submit the recorded list while its landing is pending. The ordered planner can forward the fill, but does not retain the placed copy's CPU-source dependency. A nonempty GPU plan skips the ordinary blocked_by wait; Placed::prepare then reads old CPU S into scratch. Expected: retain the wait whenever a placed copy still needs CPU bytes from a pending writer. Eligible GPU-only source copies should retain forwarding. Acceptance: - Carry the placed copy's CPU-source wait requirement into GPU-step planning and reject that plan before side effects. - A regression covers the prerecorded upload-source case, including an unrelated forwarded fill, and fails on the current planner. - Existing ordered GPU-source cases remain eligible; focused planner tests pass. - Validate the guarded implementation in the normal game before enabling ordered splitting in performance tests. Files: crates/victory-gpu/src/host/card_steps.rs, host/place.rs and Host::submit. Claim: Codex / krofty is implementing this focused fix on its own branch. This supports the ongoing work coordinated at Snaacky/ztrx#249. Other authors' branches and Snaacky's shader work will remain untouched; the PR will stay open.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:22:38 +00:00
Author
Owner

@⁠krofty on GitHub · 2026-11-27 18:42 UTC · original

Implemented in #117 on an isolated fork branch; no merge performed.

The exact production planner regression fails when the guard is removed and passes with it. Planner module checks, diagnostics build and two normal in-world off/on validation runs completed. The two game runs logged no exception or device loss; hardware-specific synthetic tests were not exercised by CPU-only module testing.

The separate ordered-splitting experiment regressed rather than providing an FPS win, so the working preset keeps it disabled. The source-wait correctness guard is retained. Full validation limits are documented on the PR.

Codex implementation ownership released for review; PR remains open. Follow-up work under #136 concerns independent timestamp-slot lifetime safety.

**@⁠krofty** on GitHub · 2026-11-27 18:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/109#issuecomment-7225785489) Implemented in https://git.gtahub.st/github/trustno1-coder--VIctory-NVIDIA/pulls/117 on an isolated fork branch; no merge performed. The exact production planner regression fails when the guard is removed and passes with it. Planner module checks, diagnostics build and two normal in-world off/on validation runs completed. The two game runs logged no exception or device loss; hardware-specific synthetic tests were not exercised by CPU-only module testing. The separate ordered-splitting experiment regressed rather than providing an FPS win, so the working preset keeps it disabled. The source-wait correctness guard is retained. Full validation limits are documented on the PR. Codex implementation ownership released for review; PR remains open. Follow-up work under #136 concerns independent timestamp-slot lifetime safety.
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-27 21:08 UTC · original

Thanks. This is implemented in PR #117, so the change is tracked there now. Closing the issue to keep one place for it.

**@⁠trustno1-coder** on GitHub · 2026-11-27 21:08 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/109#issuecomment-7228166920) Thanks. This is implemented in PR #117, so the change is tracked there now. Closing the issue to keep one place for it.
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/trustno1-coder--VIctory-NVIDIA#109
No description provided.