Repository navigation
Conversation
Adds an optional frame-rate limit applied before Present (sleep, then spin; a late frame is not made up for), a window mode switch on the presenting window (F11 or Alt+Enter, or window_mode = borderless at start), and a log line with the gaps between presents. Refs fxceless#727 and fxceless#728 (phase 0). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
clquwu
added a commit
to clquwu/leonida-ultimate
that referenced
this pull request
Nov 25, 2026
…A_FPS_LIMIT pacing Implements Wave 11A Ranks #1, #2, and #3 (GPL-3.0 attributed, zero RVAs, zero non-trivial thread_local): 1. Buffered overlapped DirectStorage + page-cached read-only pack opens (adapted from Marvisak/VIctory#2427, GPL-3.0): - runtime/shims/file_system.cpp: strip FILE_FLAG_NO_BUFFERING on read-only non-overlapped CreateFileW opens so Windows page cache and sequential read-ahead accelerate RPF pack reads while preserving the flag for CreateFileA, write opens, and overlapped opens. - runtime/shims/dstorage.cpp: open primary DirectStorage file handles with FILE_FLAG_OVERLAPPED using per-worker OVERLAPPED + event handles (with CancelIoEx safety on failed waits) so all worker threads issue true parallel cached I/O on the same pack file; flip LEONIDA_DSTORAGE_NO_BUFFERING default to 0 (opt-in =1 for low-RAM hosts). 2. Fast C++20/SSE2 zlib_inflate + lock-free DirectStorage stats & Status batching (inspired by Marvisak/VIctory#1355, GPL-3.0): - runtime/src/zlib_fast.h & runtime/src/shader_library.h: 11-bit canonical Huffman primary LUT, register-resident 64-bit bit buffer with single-refill fast inner loop, bulk memcpy/memset/doubling LZ77 copies, single-memcpy stored blocks, and chunked SSE2 Adler-32 (5.6x-6.5x speedup on 4 MiB dynamic+LZ77 benchmark: 230.9 MiB/s -> 1,302-1,501 MiB/s). - runtime/shims/dstorage.cpp: replace global stats().mutex locks on hot counters with lock-free relaxed std::atomic counters; batch independent file requests across non-fence Status entries while preserving exact queue-order Status completion, FirstFailure attribution, alias checks, and hard Signal/Event barriers. 3. Configurable uncapped / target frame pacing via LEONIDA_FPS_LIMIT (adapted from fxceless/victory-fork#773 & ubiquitarianism/leonida@77ded8a050, GPL-3.0): - runtime/src/frame_pacer.h & runtime/shims/xbox_present.cpp: support LEONIDA_FPS_LIMIT=0 (uncapped, even with LEONIDA_FRAME_PACING=1) and LEONIDA_FPS_LIMIT=1..1000 (overrides 30 Hz title interval and paces PresentX via sleep+1.5ms spin without catch-up bursts, using sync_interval=0). - runtime/src/main.cpp: skip forcing LEONIDA_FRAME_PACING=1 in --first-run-ui when LEONIDA_FPS_LIMIT is set. Verification: 7/7 CTests pass with Vulkan validation on RTX 3080 (0 validation errors), check_no_game_data.py 0 violations.
CernyMuzCZ
pushed a commit
to CernyMuzCZ/vitezstvi-fork
that referenced
this pull request
Nov 25, 2026
… borderless toggle)
CernyMuzCZ
pushed a commit
to CernyMuzCZ/vitezstvi-fork
that referenced
this pull request
Nov 25, 2026
…; VICTORY_KBM=0: the old stand-in keys) Ported from the ScarlettPort runtime's fx-kbm work (victory-core kbm, pace and fastboot; gameinput feeding them; the window procedure capturing the cursor on a click and freeing it on focus loss). A WM_CLOSE without the menu command also ends the title now. GameInput's reading history stays at 256 (fxceless#23); F11 and Alt+Enter borderless (fxceless#773) are unchanged. See docs/input.md.
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.
Refs #727 (window mode, fps limit) and #728 (phase 0, measurement). Does not close either.
What is in it
[display] fps_limitinvictory.toml(envVICTORY_FPS_LIMIT, 0 = off, at most 1000). Applied just beforePresent: sleep until 1.5 ms before the deadline, then spin. A late frame is not made up for (no burst after a slow frame). The title's own frame clock (frame.rs) is untouched.[display] window_mode = "windowed" | "borderless"(envVICTORY_WINDOW_MODE) and F11 / Alt+Enter at run time, on the windowvictory-gpucreates. Borderless is a popup over the monitor the window is on (flip model, no exclusive fullscreen); the swap chain keeps the title's size and is stretched, so another aspect ratio is stretched too. The windowed rectangle and style are restored on the way back. The toggle runs on the window's own thread. A window made by the title is not touched.VICTORY_FPS_LIMIT,[display] fps_limit,window_mode). README andvictory.example.tomldocument the keys.Overlap: #433 (
[window] size, start-up size) and #131 (borderless by default) touch the same window code. This adds no size setting and keeps the default windowed, so it should rebase on either;config.rsandhost.rswill need a manual merge with #433. Not duplicated: no[window]table here.Tested
cargo test --workspace --locked --no-fail-fast: 540 passed, 0 failed, 10 ignored (WARP, Windows 11). One earlier run failedinplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offsetonce and passed on the next two runs; this change does not touchinplace.rs; cause not investigated.Not tested
non verifie.GetAsyncKeyState), as the F3 key of On-screen overlay of where the frame goes (F3), logged to overlay.log #717 would.non verifiewhat the title does with F11.non verifie.AI use
Written with Claude Sonnet 5.5 (Claude Code).