Repository navigation
Improve frame pacing and expose rendering and simulation timings - #5
Merged
Merged
Conversation
fred-huang122
changed the base branch from
perf/render-device-status
to
master
November 2, 2026 17:33
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.
The 60 FPS setting used a repeating 17 ms timer and stopped requesting frames whenever physics fell two ticks behind. Schedule rendering against absolute deadlines, skip missed render deadlines, and continue drawing completed immutable snapshots while the existing lag warning reports simulation delay.
Validation: all 25 local regressions pass in 70.18 s. Deterministic deadline tests cover 1/5/59.94/60/120/1000 FPS, invalid inputs, late deadlines and bounded histories. Real-window regressions fail on the old rounded/backlog policy and pass after the fix. A screenshot regression reproduces GL_INVALID_OPERATION on every context switch before the query-lifetime fix, then verifies clean resumed window frames afterward. Existing picking, framebuffer, fallback, HiDPI, worker, physics and collision checks remain enabled. Direct double-precision ODE, collision geometry/materials, tolerances, timestep and five substeps are unchanged.
The cadence change removes a software scheduling limit; it does not establish sustained 60 FPS for the full-detail scene. Three paired 6 v 6 rounds at a 956x545 viewport, 3 s warmup + 3 s measurement, stock Mesa 25.2.8 and the actual RTX 4060 Laptop D3D12 context give:
These paired trials measure commit 8503a78 before the later optional-query lifetime cleanup. Previous FPS counts end-of-draw callbacks; new FPS counts paint/swap completion. No average-throughput speedup is claimed. Existing workloads remain running; GPU use with grSim closed ranges 0–23% during this matrix.
The final f0a659e app also tests the larger 1596x825 viewport. At normal detail it remains below 60 FPS. Three final Low Spec trials per case give spaced 59.35–60.20 FPS (median 59.94) and pushing 55.72–60.05 FPS (median 56.95), with simulation/wall ratios 0.995–1.001 and maximum observed backlog below 21 ms. Low Spec changes rendering detail/resolution; physics accuracy is unchanged. It can reach 60 FPS but does not sustain that in every pushing run.
Profiling separates under-1-ms scene submission and roughly 0.3-ms labels from much longer completion/swap waits. Clear, robot-only and field-only probes reach about 60 FPS, while the combined full-detail scene remains slower. Swap overrides, batching and private-Mesa experiments do not provide a validated production fix; prototypes and all raw profiling data stay outside Git.
Latest CI passes Ubuntu 22.04/24.04 and native arm64 macOS 26, including its OpenGL runtime checks. The final macOS 15 build/package job remains queued, so the dependent exact-package launch on macOS 26 is pending. The earlier cadence head packaged and launched successfully on macOS 15. Hosted Mac graphics use Apple Software Renderer and do not establish physical Mac GPU throughput.
Stacked on #4. Physics replay and measurement tooling is independent in #6, based on #3.