Skip to content

frame: fix frame scheduling being skipped or one vblank off#15404

Open
gulafaran wants to merge 5 commits into
hyprwm:mainfrom
gulafaran:frame
Open

frame: fix frame scheduling being skipped or one vblank off#15404
gulafaran wants to merge 5 commits into
hyprwm:mainfrom
gulafaran:frame

Conversation

@gulafaran

Copy link
Copy Markdown
Contributor

in renderer we need to check if we have pending damage, needsFrame can be cleared by commits that was done while pageflip was in flight.

m_renderingActive also needs to be set after actually comitting.

add a commitTimingTarget that we check against on presentation otherwise the committiming timer runs only on duration and might miss the upcoming vblank period as in always being one vblank late. and use the timespec we get from presentation.

wants: hyprwm/aquamarine#334

warrants a bit of VRR/DS testing because of the needsFrame changes.

in renderer we need to check if we have pending damage, needsFrame can
be cleared by commits that was done while pageflip was in flight.

m_renderingActive also needs to be set after actually comitting.

add a commitTimingTarget that we check against on presentation otherwise
the committiming timer runs only on duration and might miss the upcoming
vblank period as in always being one vblank late. and use the timespec
we get from presentation.
@gulafaran

Copy link
Copy Markdown
Contributor Author

@fxzzi and @Dregu claims vrr works. il just undraft this then

@gulafaran
gulafaran marked this pull request as ready for review July 15, 2026 14:44
@vaxerski

Copy link
Copy Markdown
Member

@codex review please

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 516ec17362

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/output/Monitor.cpp Outdated
Comment thread src/protocols/CommitTiming.cpp
skip early release on invalid timestamp, and rely on the timer timeout
if missing.

makes the presented signal emit a std::optional timestamp instead.
if the surface entered multiple outputs, we cant early release it
because they flip at different times and might make it release way
before the flip of the other monitor.
@vaxerski

Copy link
Copy Markdown
Member

@codex review please

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47e1c2f25c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/protocols/CommitTiming.cpp Outdated
get the absolute target directly from the requested timestamp.
reset commitTimingTarget if delay is 0, and reset it in SSurfaceState
reset.
@vaxerski

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c960066ed3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/protocols/CommitTiming.cpp Outdated
Comment thread src/output/Monitor.cpp Outdated
use fromTimespec so "C++ steady-clock epoch does not exactly match
CLOCK_MONOTONIC" doesnt occur. unify the timespec code in both
monitor and commit timing protocol. always send the timespec on monitor
presented signal.
@vaxerski

Copy link
Copy Markdown
Member

@codex review this man

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: a4e11613bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gulafaran

Copy link
Copy Markdown
Contributor Author

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: a4e11613bd
ℹ️ About Codex in GitHub

thank you robot, you have nagged me at every corner, im balding thanks to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants