godot
godot copied to clipboard
Performance monitors dont report any values for 2D projects
Operating system or device - Godot version: Linux, 3.0master
Issue description: Performance monitors show all 0 all the time, except for FPS which seems to be working. Both in profiler and via code.
First of all thank you for your report and sorry for the delay.
We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.
We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us. Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about its current status here?
For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.
Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.
Thanks in advance.
Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.
this one looks same with #9080
According to https://github.com/godotengine/godot/issues/9080#issuecomment-380034074, Performance.get_monitor(Performance.RENDER_DRAW_CALLS_IN_FRAME)
don't work for 2D but it works fine for 3D.
Seems to still be relevant in master
This is still an issue in 3.0.6 although it seems that this is only a problem in 2D mode and not 3D.
Still valid in the current master
branch (966c68ba) and vulkan
branch.
Still valid in 494bf38
still valid in godot 4.0 stable
still valid in godot 4.1 stable
still valid in godot 4.1.1 stable
still valid in godot 4.1.2 stable mono
If anyone is interested in implementing this, this is where it's implemented in 3D:
- Objects: https://github.com/godotengine/godot/blob/5ee983188de97ae027f9b9c1443438063f708a7e/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp#L709-L711
- Primitives: https://github.com/godotengine/godot/blob/5ee983188de97ae027f9b9c1443438063f708a7e/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp#L1011-L1030
- Draw calls: https://github.com/godotengine/godot/blob/5ee983188de97ae027f9b9c1443438063f708a7e/servers/rendering/renderer_rd/forward_clustered/render_forward_clustered.cpp#L702-L814
The counters likely need to be incremented somewhere around here:
https://github.com/godotengine/godot/blob/5ee983188de97ae027f9b9c1443438063f708a7e/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp#L1101
I'd suggest adding 2D to the existing counters as an initial implementation, but it may be worth looking into adding separate counters so that 2D and 3D resource usage can be tracked separately. This may require creating a second instance of the render_info
struct dedicated for 2D statistics, then reporting it upwards to the RenderingServer and built-in performance monitors.