render3d: actor_own_skin / skin_clone_free, and a frame's scratch and tables made with the device

actor_own_skin(a) gives an actor its own clone of its model's skeleton and actor_release frees it
(skin_clone_free: the pose, matrices, views and scratch the clone made; the rest data stays its
source's). gvk_startup_state, at the end of gvk_init, makes the scratch and tables a draw used to
make on first need (gvk_tmp_buf, the pipeline fast cache, the set key and per-program uniform
offsets pre-sized to 4096 programs, skip/seen/size words, spare and retired lists, the grass cull's
words), and those frame paths no longer start them. Compiled (steady).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 16:02:21 +03:00
parent dec64e8a59
commit f4e121ae94
6 changed files with 69 additions and 29 deletions

View file

@ -246,3 +246,14 @@ function skin_free(sk: Skin) -> void {
if sk.bones_v != null { free(sk.bones_v) }
free(sk)
}
# A skin_clone given back: what the clone made for itself (its pose, its matrices and their views, its
# scratch). The rest data, the joints and the names are its source's and stay.
function skin_clone_free(sk: Skin) -> void {
if sk == null { return }
free(sk.pose_r); free(sk.pose_t); free(sk.gmat); free(sk.bones)
if sk.gmat_v != null { free(sk.gmat_v) }
if sk.bones_v != null { free(sk.bones_v) }
free(sk.tmp_l); free(sk.tmp_q); free(sk.tmp_a); free(sk.tmp_b); free(sk.tmp_c); free(sk.tmp_v)
free(sk)
}