mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #2106] present: LEONIDA_FPS_CAP ceiling and one intro-splash decode (RT-PRES… #2111
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2111
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2106
Author: @BubsMcgee
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:present-frame-pacer📝 Commits (1)
6f74724present: LEONIDA_FPS_CAP ceiling and one intro-splash decode (RT-PRESENT-FPS-CAP)📊 Changes
6 files changed (+199 additions, -7 deletions)
View changed files
📝
runtime/CMakeLists.txt(+7 -0)📝
runtime/shims/dxgi_com.cpp(+6 -0)📝
runtime/shims/package_splash.cpp(+30 -6)📝
runtime/shims/xbox_present.cpp(+5 -1)➕
runtime/src/fps_cap.h(+77 -0)➕
runtime/test/fps_cap_test.cpp(+74 -0)📄 Description
…ENT-FPS-CAP)
LEONIDA_FPS_CAP= is a present-rate ceiling on top of the title's own frame interval, so the GPU gets idle time between frames instead of being fed every frame the CPU can produce (steadier pacing, lower power). It composes with the console path's FramePacer rather than replacing it: SetFrameIntervalX lengthens a requested interval shorter than the cap, so the vblank grid, latency, tokens and statistics stay consistent. The DXGI swapchain has no such pacer, so its Present waits at the cap (sleep the bulk, spin the last millisecond; a late frame does not accumulate a debt). LEONIDA_PRESENT_UNCAP still wins on the console path.
The intro splash used to decode and Fant-scale the WIC image twice (the GDI paint from the ShowWindow hook and the D3D12 splash texture); the decoded pixels are now cached by client size, so both share one decode, and the cache is cleared when the package is configured again.
Tested: fps_cap_test 16/16 (period, interval clamp, env parsing), existing frame_pacer passes, gta6rt_d3d12_com builds. No GPU or game data needed. AI-assisted.
Claimed in the coordination issue as:
Depends on:
Fixes:
What and why
Tested
GPUs tested:
AI-assisted:
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.