Skip to content

Display real FPS as a fallback if GPU time information is not available#99301

Open
Calinou wants to merge 1 commit into
godotengine:masterfrom
Calinou:editor-fps-gpu-time-fallback
Open

Display real FPS as a fallback if GPU time information is not available#99301
Calinou wants to merge 1 commit into
godotengine:masterfrom
Calinou:editor-fps-gpu-time-fallback

Conversation

@Calinou

@Calinou Calinou commented Nov 15, 2024

Copy link
Copy Markdown
Member

This fixes FPS being reported as 100000 on the web editor and on other platforms/renderers where GPU time information isn't available.

Preview

image

@Calinou Calinou added bug topic:editor cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Nov 15, 2024
@Calinou Calinou added this to the 4.4 milestone Nov 15, 2024
@Calinou Calinou requested a review from a team as a code owner November 15, 2024 22:03
@Calinou Calinou requested a review from a team November 15, 2024 22:03
@Calinou Calinou force-pushed the editor-fps-gpu-time-fallback branch 2 times, most recently from a1ab049 to 467a401 Compare November 15, 2024 22:05
@passivestar

Copy link
Copy Markdown
Contributor

Rebased to test with metal, it works but I had to enable interface/editor/update_continuously to see the real fps and the tooltip says I shouldn't use it

image

@Calinou

Calinou commented Feb 14, 2025

Copy link
Copy Markdown
Member Author

Rebased to test with metal, it works but I had to enable interface/editor/update_continuously to see the real fps and the tooltip says I shouldn't use it

That's the downside of displaying the real FPS – it will be affected by FPS caps (internal to Godot or external). By default, editor FPS is capped to 145 by the Low Processor Mode Sleep Usec setting (the maximum FPS is determined by 1000000 / value). The FPS can be capped even lower by V-Sync depending on the display refresh rate.

That said, I expect you will be below 145 FPS on a Retina display most of the time anyway, especially in complex 3D scenes with various environment effects enabled.

@passivestar

Copy link
Copy Markdown
Contributor

That said, I expect you will be below 145 FPS on a Retina display most of the time anyway, especially in complex 3D scenes with various environment effects enabled.

I normally don't have resolution scaling set to 1.0, usually something like 0.6. And if m1 max can't render over 145 fps easily with that scale I assume the game to be unplayable for most people because it's not a low-end gpu. That's why I'm afraid fps counter limited to 145 fps is equally as uninformative as an fps counter that always shows 100000 fps in trying to quickly assess how different things in a scene affect performance. Not being able to see that without running the game is a big regression tbh

@Calinou

Calinou commented Feb 17, 2025

Copy link
Copy Markdown
Member Author

That's why I'm afraid fps counter limited to 145 fps is equally as uninformative as an fps counter that always shows 100000 fps in trying to quickly assess how different things in a scene affect performance. Not being able to see that without running the game is a big regression tbh

Unfortunately, if we can't access GPU timings, there is no good solution to this. Enabling Update Continuously greatly increases power consumption, so doing it while you are working in the 3D editor viewport would negatively impact battery life and heat/noise emissions. You would also need V-Sync to be disabled so that FPS isn't capped by the monitor refresh rate, and some people may dislike the resulting tearing from this.

This increase in power consumption could be more measured if Update Continuously only kicked in while freelook is active, but again, people would wonder why FPS suddenly changes when entering or exiting freelook.

In any case, I wouldn't show a FPS counter that says 100000 because it's trying to avoid a division by zero.

@Repiteo Repiteo added the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Feb 24, 2025
@Repiteo Repiteo modified the milestones: 4.4, 4.5 Feb 24, 2025
@Repiteo Repiteo added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Sep 5, 2025
@Repiteo Repiteo modified the milestones: 4.5, 4.6 Sep 5, 2025
This fixes FPS being reported as 100000 on the web editor and on
other platforms/renderers where GPU time information isn't available.
@Calinou Calinou force-pushed the editor-fps-gpu-time-fallback branch from 467a401 to c23e4d7 Compare December 18, 2025 00:41
@akien-mga akien-mga removed cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Jan 13, 2026
@akien-mga akien-mga modified the milestones: 4.6, 4.x Jan 13, 2026
@Repiteo Repiteo requested review from a team as code owners February 17, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

View Frame Time FPS counter (and Viewport GPU render time) is not working on macOS on Intel IGP or when using Metal

4 participants