setPresentMode FFI: runtime Fifo/Mailbox/Immediate + a working fps cap#80
Closed
proggeramlug wants to merge 1 commit into
Closed
setPresentMode FFI: runtime Fifo/Mailbox/Immediate + a working fps cap#80proggeramlug wants to merge 1 commit into
proggeramlug wants to merge 1 commit into
Conversation
Round-2 audit F6: the present mode was hardcoded Fifo at both surface config sites, which also made setTargetFPS inert — its sleep-based cap only engages when vsync is off, and vsync could never be off. - Renderer::set_present_mode(0=Fifo, 1=Mailbox, 2=Immediate): reconfigures the live surface on change; no-op when unchanged; logs the switch. All three modes are DXGI-native on Windows. - FFI bloom_set_present_mode + TS setPresentMode + manifest entry (Perry silently no-ops undeclared natives). Validated on the live game at 4K: "bloom: present mode = Immediate" followed by getFPS pinning at a steady 29 under setTargetFPS(30) — the first time the cap has ever engaged. This is the knob that makes audit decision D1 (operating point) testable: cap-45 / cap-60 / uncapped can now be compared like-for-like.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Contributor
Author
|
Landed in main via the round-2 consolidation merge (#83). All commits from this branch are now on main; closing as merged-through-integration. |
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.
Stacked on #75. Audit F6: present mode was hardcoded Fifo everywhere, and
setTargetFPSwas silently inert because its sleep-based cap only runs when vsync is off.Renderer::set_present_mode(0|1|2)reconfigures the live surface on change (no-op when unchanged, logged). All three modes are DXGI-native on Windows.bloom_set_present_modeFFI +setPresentModeTS export + manifest entry.Validated live at 4K: log shows
present mode = Immediate, thengetFPSpins at a steady 29 undersetTargetFPS(30)— the cap engaging for the first time. This unlocks audit decision D1 (operating point): cap-45 vs cap-60 vs uncapped are now directly comparable.Found during validation (worth knowing): calling any renderer FFI before
initWindowpanic-aborts with "Engine not initialized" (c0000409) — that's the exact signature of the older ucrtbase crash events in the Application log from past sessions.