[PR #2087] Keep current frame-token statistics at or before the poll (FRAME-PACER-EARLY-ORIGIN) #2091

Open
opened 2026-11-26 21:20:00 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2087
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: codex/frame-pacer-early-origin


📝 Commits (1)

  • 6921a27 Keep current frame token statistics at or before the poll

📊 Changes

2 files changed (+24 additions, -1 deletions)

View changed files

📝 runtime/src/frame_pacer.h (+2 -1)
📝 runtime/test/frame_pacer_test.cpp (+22 -0)

📄 Description

Claimed in the coordination issue as: FRAME-PACER-EARLY-ORIGIN

What and why

A current-token poll can return immediately before the configured origin offset. Its frame-event statistic then points into the future, even after the token has been presented. Record the poll timestamp when the scheduled origin is still ahead. Use the original grid to compute the token's due time.

Tested

  • Windows 11, MSVC 19.51. The new fake-clock regression failed on main db1a22d. It passed through frame_pacer CTest with the fix, including the first display on the configured vblank.
  • Verified git diff --check and the source-only check.

GPUs tested: n/a.

AI-assisted: yes.

  • Based on current main.
  • One topic.
  • Uses source and a synthetic clock.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2087 **Author:** [@alexandersato0830](https://github.com/alexandersato0830) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/frame-pacer-early-origin` --- ### 📝 Commits (1) - [`6921a27`](https://github.com/ubiquitarianism/leonida/commit/6921a278fd62df683f6c361a2ab7a8a0e6d515f7) Keep current frame token statistics at or before the poll ### 📊 Changes **2 files changed** (+24 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `runtime/src/frame_pacer.h` (+2 -1) 📝 `runtime/test/frame_pacer_test.cpp` (+22 -0) </details> ### 📄 Description Claimed in the coordination issue as: [FRAME-PACER-EARLY-ORIGIN](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172851224) ### What and why A current-token poll can return immediately before the configured origin offset. Its frame-event statistic then points into the future, even after the token has been presented. Record the poll timestamp when the scheduled origin is still ahead. Use the original grid to compute the token's due time. ### Tested - Windows 11, MSVC 19.51. The new fake-clock regression failed on main `db1a22d`. It passed through `frame_pacer` CTest with the fix, including the first display on the configured vblank. - Verified `git diff --check` and the source-only check. GPUs tested: n/a. AI-assisted: yes. - [x] Based on current `main`. - [x] One topic. - [x] Uses source and a synthetic clock. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#2091
No description provided.