WIP: fix(framegen): a fixed multiplier is capped so the game stays at 30 fps or more (8x on 165 Hz: 5x) #2332

Closed
NotRexed wants to merge 1 commit from fix/framegen-mult-cap into main
NotRexed commented 2026-11-11 15:09:58 +00:00 (Migrated from github.com)

The owner, testing on a 165 Hz display: ~60 fps natively, but with frame generation at 8x the game fell to ~10 fps while the counter showed ~60.

Each game frame's made frames are shown at the display's refreshes, so at m x the game runs at most refresh / m: 8x on 165 Hz holds it to ~20 fps. With 7 frames made on the GPU for each of its own at 1440p, it fell to ~10. The log agrees: most made frames were shown 12-17 ms apart, and over half were late.

A fixed multiplier is now capped at refresh / 30 (at least 2), so the game is never held under 30 fps to fill the display:

display most
60 Hz 2x
144 Hz 4x
165 Hz 5x
240 Hz 8x

The cap is logged once when it applies. Auto is unchanged. tests/test_framegen_auto.py checks the caps (passes locally).

Draft: it still needs an in-game check at 8x on the 165 Hz display, which waits until the owner's test session is over.

🤖 Generated with Claude Code

The owner, testing on a 165 Hz display: ~60 fps natively, but with frame generation at 8x the game fell to ~10 fps while the counter showed ~60. Each game frame's made frames are shown at the display's refreshes, so at m x the game runs at most refresh / m: 8x on 165 Hz holds it to ~20 fps. With 7 frames made on the GPU for each of its own at 1440p, it fell to ~10. The log agrees: most made frames were shown 12-17 ms apart, and over half were late. A fixed multiplier is now capped at **refresh / 30** (at least 2), so the game is never held under 30 fps to fill the display: | display | most | |---|---| | 60 Hz | 2x | | 144 Hz | 4x | | 165 Hz | 5x | | 240 Hz | 8x | The cap is logged once when it applies. Auto is unchanged. `tests/test_framegen_auto.py` checks the caps (passes locally). **Draft:** it still needs an in-game check at 8x on the 165 Hz display, which waits until the owner's test session is over. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
NotRexed commented 2026-11-11 22:21:03 +00:00 (Migrated from github.com)

Superseded by the frame generation rework (the PR for branch fix/framegen-native-kept): it caps a fixed multiplier at what the display can show and never lets the display thread hold the game back, rather than only keeping the game above 30 fps.

Superseded by the frame generation rework (the PR for branch fix/framegen-native-kept): it caps a fixed multiplier at what the display can show and never lets the display thread hold the game back, rather than only keeping the game above 30 fps.
NotRexed commented 2026-11-11 22:21:07 +00:00 (Migrated from github.com)

The replacement is #2531.

The replacement is #2531.
Commenting is not possible because the repository is archived.
No description provided.