H1: make bench, render budgets, and a third of the figure draw calls
make bench (tools/bench.sh, tools/bench_report.gd) measures the server's p50/p99/max tick with 24 bots on three seeds over a whole match, and the client's draw calls, primitives, objects, nodes and memory at six moments of a match rendered in the capture container. It fails on anything over the budgets now recorded in docs/ARCHITECTURE.md: p99 tick 12 ms, 2,000 draw calls and 2,000,000 primitives per frame (all passes), 1 GiB video and 512 MiB static memory. Every capture now reports its frame's render counts in a "render" field. The first run put the barge, with 24 figures together, at 2,197 draw calls. Each figure part had one surface per colour (about 43 per figure, drawn again for shadows). FigureRig now merges a part's surfaces into one per finish (coat, gilt, plain) and carries the Palette colours as vertex colours, with shared materials. The barge is down to 1,207 draw calls, with the same triangles and the same look. Frame rates on a real GPU are not measured here; that stays with R6. Closes #54 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,5 +57,26 @@ func _capture() -> void:
|
||||
stats["adapter"] = RenderingServer.get_video_adapter_name()
|
||||
stats["blank"] = blank
|
||||
stats["saved"] = error == OK
|
||||
stats["render"] = render_counts()
|
||||
print("CAPTURE " + JSON.stringify(stats))
|
||||
quit(0 if error == OK and (not blank or _allow_blank) else 1)
|
||||
|
||||
|
||||
## H1: what the last frame cost to draw. "draw_calls", "primitives" and "objects" cover
|
||||
## every pass (shadows included); "visible_*" only the main camera pass. Memory is in
|
||||
## bytes. Counts, not timings: software rendering says nothing about real frame rates.
|
||||
func render_counts() -> Dictionary:
|
||||
var counts: Dictionary = {
|
||||
"draw_calls": int(Performance.get_monitor(Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME)),
|
||||
"primitives": int(Performance.get_monitor(Performance.RENDER_TOTAL_PRIMITIVES_IN_FRAME)),
|
||||
"objects": int(Performance.get_monitor(Performance.RENDER_TOTAL_OBJECTS_IN_FRAME)),
|
||||
"visible_draw_calls": root.get_render_info(Viewport.RENDER_INFO_TYPE_VISIBLE, Viewport.RENDER_INFO_DRAW_CALLS_IN_FRAME),
|
||||
"visible_primitives": root.get_render_info(Viewport.RENDER_INFO_TYPE_VISIBLE, Viewport.RENDER_INFO_PRIMITIVES_IN_FRAME),
|
||||
"shadow_draw_calls": root.get_render_info(Viewport.RENDER_INFO_TYPE_SHADOW, Viewport.RENDER_INFO_DRAW_CALLS_IN_FRAME),
|
||||
"video_mem_bytes": int(Performance.get_monitor(Performance.RENDER_VIDEO_MEM_USED)),
|
||||
"texture_mem_bytes": int(Performance.get_monitor(Performance.RENDER_TEXTURE_MEM_USED)),
|
||||
"buffer_mem_bytes": int(Performance.get_monitor(Performance.RENDER_BUFFER_MEM_USED)),
|
||||
"static_mem_bytes": OS.get_static_memory_usage(),
|
||||
"nodes": int(Performance.get_monitor(Performance.OBJECT_NODE_COUNT)),
|
||||
}
|
||||
return counts
|
||||
|
||||
Reference in New Issue
Block a user