present: LEONIDA_FPS_CAP ceiling and one intro-splash decode (RT-PRES… #2106

Closed
BubsMcgee wants to merge 1 commit from upstream-pr/2106 into main
BubsMcgee commented 2026-11-25 20:52:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by BubsMcgee on 2026-11-25T20:52:25Z.


…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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5498985065 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2106). Originally posted by [BubsMcgee](https://github.com/BubsMcgee) on 2026-11-25T20:52:25Z. --- …ENT-FPS-CAP) LEONIDA_FPS_CAP=<fps> 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: <!-- the item ID from the open "Coordinating who works on what" issue, for example TEST-17, or a link to your claim --> Depends on: <!-- #N for every pull request this one builds on or conflicts with (the coordination issue's Commands section, AGENTS.md); delete the line if it builds on none and conflicts with none --> Fixes: <!-- #N for each issue this closes (GitHub closes it on merge); delete the line if it closes none --> ### What and why <!-- What this changes and the problem it solves. --> ### Tested <!-- What you ran and on which GPU and driver (CONTRIBUTING.md). For the shader translator: how many shaders translate and pass spirv-val, before and after. --> GPUs tested: <!-- vendor, model, driver and OS of each GPU the GPU tests ran on, or n/a --> AI-assisted: <!-- yes or no (AGENTS.md asks a coding agent to say so) --> ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
MoonEyes commented 2026-11-29 12:55:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T12:55:44Z.


Main already has LEONIDA_FPS_CAP in Rust (d3d12/crates/leonida-gpu/src/frame.rs:28-46), where 0 means "none"; here 0 means "off" and the cap is added a second time in C++. Could you split this: drop the C++ cap (or explain what the Rust one misses), and send the splash cache as its own PR? Otherwise we'll close this one.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256163634 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2106#issuecomment-7256163634). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T12:55:44Z. --- Main already has LEONIDA_FPS_CAP in Rust (d3d12/crates/leonida-gpu/src/frame.rs:28-46), where 0 means "none"; here 0 means "off" and the cap is added a second time in C++. Could you split this: drop the C++ cap (or explain what the Rust one misses), and send the splash cache as its own PR? Otherwise we'll close this one.
MoonEyes commented 2026-11-29 12:56:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T12:56:31Z.


Main already has LEONIDA_FPS_CAP in Rust (d3d12/crates/leonida-gpu/src/frame.rs:28-46), where 0 means "none"; here 0 means "off" and the cap is added a second time in C++. Could you split this: drop the C++ cap (or explain what the Rust one misses), and send the splash cache as its own PR? Otherwise we'll close this one.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256173347 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2106#issuecomment-7256173347). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T12:56:31Z. --- Main already has LEONIDA_FPS_CAP in Rust (d3d12/crates/leonida-gpu/src/frame.rs:28-46), where 0 means "none"; here 0 means "off" and the cap is added a second time in C++. Could you split this: drop the C++ cap (or explain what the Rust one misses), and send the splash cache as its own PR? Otherwise we'll close this one.
aslan2142 commented 2026-12-01 12:20:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:20:14Z.


Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7310986149 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2106#issuecomment-7310986149). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:20:14Z. --- Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 16:42:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:42:08Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7318064763 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2106#issuecomment-7318064763). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:42:08Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!2106
No description provided.