Uh oh!
There was an error while loading. Please reload this page.
setPresentMode FFI: runtime Fifo/Mailbox/Immediate + a working fps cap - #80
setPresentMode FFI: runtime Fifo/Mailbox/Immediate + a working fps cap#80proggeramlug 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 |
proggeramlug
commented
Jul 8, 2026
Landed in main via the round-2 consolidation merge (#83). All commits from this branch are now on main; closing as merged-through-integration. |
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.