render3d: R3D_VKMEM=<frame> says where the GPU memory is, by owner, and the renderer's big CPU arrays
Every allocation carries the owner its maker was wrapped in (models, terrain, impostor atlases, scatter, grass, shadow maps, frame targets, sky, water, game textures, made in a frame), and the report prints each owner's images and buffers, the 25 largest images and the scatter layers', streams' and terrain's CPU copies. Nothing drawn changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f65bd1aca1
commit
6289564382
17 changed files with 315 additions and 15 deletions
|
|
@ -175,9 +175,17 @@ function gltf_prim(render3d_st: mut Render3dState, p: Val) -> Prim {
|
|||
}
|
||||
|
||||
# Load the mesh of the node called `node_name` from dir/file.
|
||||
# the GPU memory it makes is counted as VKM_MODEL (R3D_VKMEM)
|
||||
function gltf_load(render3d_st: mut Render3dState, dir: string, file: string, node_name: string) -> Model {
|
||||
let was = render3d_st.gvk_tag
|
||||
render3d_st.gvk_tag = VKM_MODEL
|
||||
let r = gltf_load__t(render3d_st, dir, file, node_name)
|
||||
render3d_st.gvk_tag = was
|
||||
return r
|
||||
}
|
||||
@alloc_ok("loading a model, a texture or a font: a load, not a frame (a guest loading a teammate's look is one)")
|
||||
@creates(Model)
|
||||
function gltf_load(render3d_st: mut Render3dState, dir: string, file: string, node_name: string) -> Model {
|
||||
function gltf_load__t(render3d_st: mut Render3dState, dir: string, file: string, node_name: string) -> Model {
|
||||
render3d_st.gltf_dir = dir
|
||||
let at = dir + "/" + file
|
||||
let text = Fs.read_text(at)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue