GPU: pace opening movie presents that skip a flip wait #2028

Closed
github-bot wants to merge 1 commit from gh-pr/2028/head into gh-pr/2028/base
Owner

@⁠Chezzuss on GitHub · 2026-11-25 03:30 UTC · original
Chezzuss:codex/pace-opening-present → main · +68 −1 · 2 files · 1 commits · closed without merging

Summary

The title's opening movie occasionally catches up by presenting a frame without first making its normal flip wait. In that case the host can present twice in one interval, giving adjacent movie frames uneven display times.

Once the title has completed a flip wait, each completed wait covers one present. A catch-up present reserves the next flip tick using the same clock lock as an explicit wait. The sleep happens after releasing the lock. Titles that have yet to complete an explicit flip wait retain their existing presentation behavior.

This ports GamingRipperDoc's fxceless #457 to the current upstream clock and its tick reservation from #174. #319 covers a different case where an explicit wait starts late.

Verification

The diagnostics executable builds on Windows. Both frame tests pass. Coverage includes a timed-out flip poll, a present after a completed wait, and two consecutive presents sharing one explicit wait.

The related integrated fxceless stack delivered a 33.35 ms median present interval in the sampled opening movie on RTX 3090. The standalone upstream port still needs its own in-title capture, so this PR is a draft.

AI-assisted.

**@⁠Chezzuss** on GitHub · 2026-11-25 03:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2028) `Chezzuss:codex/pace-opening-present` → `main` · +68 −1 · 2 files · 1 commits · closed without merging ## Summary The title's opening movie occasionally catches up by presenting a frame without first making its normal flip wait. In that case the host can present twice in one interval, giving adjacent movie frames uneven display times. Once the title has completed a flip wait, each completed wait covers one present. A catch-up present reserves the next flip tick using the same clock lock as an explicit wait. The sleep happens after releasing the lock. Titles that have yet to complete an explicit flip wait retain their existing presentation behavior. This ports GamingRipperDoc's [fxceless #457](https://github.com/fxceless/victory-fork/pull/457) to the current upstream clock and its tick reservation from [#174](https://git.gtahub.st/github/Marvisak--VIctory/pulls/174). [#319](https://git.gtahub.st/github/Marvisak--VIctory/pulls/319) covers a different case where an explicit wait starts late. ## Verification The diagnostics executable builds on Windows. Both frame tests pass. Coverage includes a timed-out flip poll, a present after a completed wait, and two consecutive presents sharing one explicit wait. The related integrated fxceless stack delivered a 33.35 ms median present interval in the sampled opening movie on RTX 3090. The standalone upstream port still needs its own in-title capture, so this PR is a draft. AI-assisted.
Port fxceless PR #457 by GamingRipperDoc to upstream tick reservation. Start implicit pacing only after an explicit flip wait and reserve presentation ticks under the frame clock lock.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:52:02 +00:00
github-bot closed this pull request 2026-11-26 04:52:02 +00:00
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-25 03:32 UTC · original

Triage verdict — Draft pacing change; cover an interval change during a wait (e957cca)

Evidence

  • The port uses the tick reservation from merged #174 and addresses a present without a fresh wait. That is separate from #319’s late explicit wait.
  • set_interval replaces the clock and resets its flip state to Unused. If a flip wait reserved its tick before the interval change and wakes afterward, it sets whichever clock is current to Ready. The replacement clock can therefore inherit a present credit from a wait reserved on the old interval.

Checks and limits

  • This is a source-level interleaving. The reported tests cover timeout and successive presents on one interval. They do not exercise replacement of the clock while a flip wait sleeps. I did not rerun the tests or the movie capture.

Next step

  • Define whether an old wait may credit a new interval and add a controlled test for that sequence. If interval changes should reset pacing, tie the credit to the clock generation that reserved the tick. Keep the standalone pacing capture as a separate readiness check.

This verification was AI-assisted.

**@⁠jeremygold02** on GitHub · 2026-11-25 03:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/2028#issuecomment-7152007642) **Triage verdict — Draft pacing change; cover an interval change during a wait** (`e957cca`) **Evidence** - The port uses the tick reservation from merged #174 and addresses a present without a fresh wait. That is separate from #319’s late explicit wait. - `set_interval` replaces the clock and resets its flip state to `Unused`. If a flip wait reserved its tick before the interval change and wakes afterward, it sets whichever clock is current to `Ready`. The replacement clock can therefore inherit a present credit from a wait reserved on the old interval. **Checks and limits** - This is a source-level interleaving. The reported tests cover timeout and successive presents on one interval. They do not exercise replacement of the clock while a flip wait sleeps. I did not rerun the tests or the movie capture. **Next step** - Define whether an old wait may credit a new interval and add a controlled test for that sequence. If interval changes should reset pacing, tie the credit to the clock generation that reserved the tick. Keep the standalone pacing capture as a separate readiness check. This verification was AI-assisted.

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/Marvisak--VIctory!2028
No description provided.