Repository navigation
Conversation
… 20261120.1 The cap was disarmed whenever frame generation was armed -- `setFpsLimit(if (lsfg) 0 else limit)` -- so a gamescope session at cap 60 with x2 reached the shim as `cap=0`. The shim then took its no-cap row, `refresh / m` acquires, and the cap the user set never arrived. Measured on Nova: `declared=mailbox source=generating cap=0 lsfg=1 acquire=30`. The shim's rule is that a cap the user asked for is the cap, whatever else is on (`limits.rs`), so the call now passes it unconditionally. Measured after: two cap changes in one session reached the shim as `cap=60 acquire=60` and `cap=70 acquire=70`. Payload 20261120.1 carries the matching shim, which spends generation's leftover as a rate rather than flooring it to whole frames per source (GameNative/gamenative-drm#71). Without that, a cap above half the refresh left the generator with a ceiling it could not spend.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
4 of 8 tasks
Contributor
Author
|
Superseded by #2484. This PR carried the cap fix only. The same change is in #2484 together with the two that had to ship with it: the payload's GL stack (GameNative/gamescope#41, GameNative/xserver#5) and generation's leftover spent as a rate (GameNative/gamenative-drm#71). Its description is carried over there, plus the device result for a GL title reaching the shim. Branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two gamescope fixes for 1.4.1, both about the frame limiter with frame generation on.
The cap now reaches the shim. It was disarmed whenever frame generation was armed (
setFpsLimit(if (lsfg) 0 else limit)), so a session at cap 60 ×2 reached the shim ascap=0and took its no-cap row (refresh / macquires). The cap the user set never arrived, and the HUD showed a rate nobody asked for. Measured on Nova before:declared=mailbox source=generating cap=0 lsfg=1 acquire=30. After: two cap changes in one session readcap=60 acquire=60and thencap=70 acquire=70.Payload
20261120.1, carrying GameNative/gamenative-drm#71: generation's leftover is spent as a rate instead of being floored to whole frames per source. At 60 Hz, cap 40, ×2 the panel leaves 20 generated against 40 source frames — one every other frame — and the old rule produced none, so generation did nothing above half the refresh while the panel still had room.The payload archive is not in this PR (it is gitignored and ships as a release asset); only the
GamescopePayload.VERSIONbump is.Not verified end to end. The app-side cap was confirmed on a device by reading the shim's census in the two sessions above; the payload half is compiled and unit-tested (130 tests, clippy clean) but has not been read back from a device yet. Expected after installing this build:
acquiretracks the cap in every session, and a cap above half the refresh shows generated frames where it previously showed none.Recording
Type of Change
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.