render3d: a command buffer holds at most 512 draws, and that many are drawn at start-up

Metal pools the command storage a command buffer grew to and grows it only when one encodes more than
any before (IOGPU under vkQueueSubmit < fn_gvk_once_end: +2-7 KB a window while a frame's draws
climbed, 192 KB in the trail scene). gvk_draw submits the frame's command buffer after
gvk_cb_cap_of draws (R3D_CB_DRAWS, 0 = none) and r3d_warm_commands draws that many through the
normal path once r3d is ready. steady: a frame drawing 20 to 200 actors grows 0 (was 2.7-7.5 KB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 13:59:00 +03:00
parent 404ee2ee3b
commit 22c104f766
4 changed files with 47 additions and 0 deletions

View file

@ -127,6 +127,7 @@ function r3d_load_step(render3d_st: mut Render3dState, i: int) -> bool {
render3d_st.r3d_fog_density = 0.00024
render3d_st.r3d_fog_falloff = 0.002
render3d_st.r3d_ready = true
r3d_warm_commands(render3d_st)
gpu_check(render3d_st, "r3d init")
}
return true