godot icon indicating copy to clipboard operation
godot copied to clipboard

Performance monitors dont report any values for 2D projects

Open nunodonato opened this issue 7 years ago • 8 comments

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.

nunodonato avatar Apr 12 '17 11:04 nunodonato

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.

kubecz3k avatar Apr 10 '18 16:04 kubecz3k

this one looks same with #9080

volzhs avatar Apr 10 '18 16:04 volzhs

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.

kubecz3k avatar Apr 10 '18 16:04 kubecz3k

Seems to still be relevant in master

Piet-G avatar Sep 16 '18 16:09 Piet-G

This is still an issue in 3.0.6 although it seems that this is only a problem in 2D mode and not 3D.

jesperkondrup avatar Nov 19 '18 14:11 jesperkondrup

Still valid in the current master branch (966c68ba) and vulkan branch.

akien-mga avatar Nov 26 '19 11:11 akien-mga

Still valid in 494bf38

KoBeWi avatar Nov 05 '20 11:11 KoBeWi

still valid in godot 4.0 stable

atsd34 avatar Mar 08 '23 13:03 atsd34

still valid in godot 4.1 stable

tomankirilov avatar Jul 13 '23 10:07 tomankirilov

still valid in godot 4.1.1 stable

yangqingming avatar Aug 29 '23 10:08 yangqingming

still valid in godot 4.1.2 stable mono

image

image

RobotoSkunk avatar Nov 01 '23 07:11 RobotoSkunk

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.

Calinou avatar Nov 03 '23 18:11 Calinou