single-device framegen, pacing overhaul, gen8 mipmaps replaeement - #3
Merged
Conversation
added 3 commits
August 15, 2026 10:18
…ement Reworks the Android path on top of 87f1b93: - Single-device framegen: the graph adopts the game's VkInstance/VkDevice (initializeExternal/createContextFromImages) instead of a private device sharing AHBs across ICDs, which scrambled memory when the game ran on a different driver than the system one. Barriers route through a sync1 compat path; required features are merged into the game's device create. - Real fence sync on the input copy (Mini::Fence) replacing a no-op submit; repeated timeouts fall back to passthrough presents. - Base fps limiter (fps_limit conf key) phase-locked to the display vsync grid published by the app (vsync.txt); generated presents spaced at baseInterval/multiplier with late-slot skip; pause/resume no longer poisons the pacing EWMA (deltas over 250 ms reset it). - Clean-room mipmaps replacement shader (shaders/mipmaps_replacement.comp, embedded at build time), default on. Mesa's experimental Adreno gen8 backend miscompiles the DLL's translated mipmaps pass (storage writes stop landing after startup, freezing the flow chain); the replacement computes the same luma pyramid without the fragile single-dispatch TGSM design. orig_mipmaps=true restores the DLL translation; a raw .spv next to conf.toml overrides either. - Diagnostics: stats.txt (measured fps + per-stage timing), debug_dump (frame/flow-chain pixel dumps), debug_inputs passthrough modes, adopted- device capability log. - Config: hot-apply for fps_limit and debug keys without swapchain recreation; experimental_present_mode conf key (fifo/mailbox/immediate).
On a saturated GPU (measured on a device running the game at 18 fps against a 30 cap) two unbounded waits could freeze the game's present thread permanently: the generated-frame vkAcquireNextImageKHR (infinite timeout) and the frame-slot completion fence wait (UINT64_MAX). - Acquire is bounded at 200 ms; a timed-out generated frame is dropped (counted as a skip). - The completion fence wait is bounded at 2 s and throws before any per-frame state changes, so the present falls through cleanly. - Graph-side fence timeouts feed the same watchdog as the copy fence: repeated timeouts disable framegen for the swapchain (full-speed passthrough) instead of stalling every frame.
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.
Reworks the Android path on top of 87f1b93: